├── MDT ├── Applications │ ├── Microsoft Internet Explorer 11 │ │ └── Readme_IE11.txt │ ├── Microsoft Office 365 C2R 2016 │ │ ├── CustomSettings.xml │ │ └── Readme_O365_2016.txt │ ├── Microsoft Office ProPlus 2013 │ │ └── Readme_Office_2013.txt │ ├── Microsoft Office ProPlus 2016 │ │ └── Readme_Office_2016.txt │ ├── Microsoft Windows Performance Toolkit 10 10240 │ │ └── Readme_WPT.txt │ ├── Microsoft Windows Performance Toolkit 10 10586 │ │ └── Readme_WPT.txt │ └── Microsoft Windows Performance Toolkit 8.1 │ │ └── Readme_WPT.txt ├── Bootstrap.ini ├── CreateMDTShare.ps1 ├── CustomSettings.ini ├── MDTScripts │ ├── AMD64 │ │ └── readme_powercfg.txt │ ├── ChangeWallpaper.ps1 │ ├── ConfigWin10.ps1 │ ├── ConfigureIPv6.ps1 │ ├── ConfigureWMI.ps1 │ ├── ConfigureWU.ps1 │ ├── DisableIEESC.ps1 │ ├── DisableServerManager.ps1 │ ├── DisableWUService.ps1 │ ├── EnableMSUpdate.ps1 │ ├── EnableRDP.ps1 │ ├── EnableWUService.ps1 │ ├── Settings.xml │ ├── UACSettings.ps1 │ ├── X86 │ │ └── readme_powercfg.txt │ ├── ZTIGather.wsf │ └── img0.jpg ├── Packages │ └── Readme_Packages.txt └── Settings.xml └── README.md /MDT/Applications/Microsoft Internet Explorer 11/Readme_IE11.txt: -------------------------------------------------------------------------------- 1 | Download IE11-Windows6.1-x64-en-us.exe and place in the root of this folder: 2 | https://www.microsoft.com/en-us/download/internet-explorer-11-for-windows-7-details.aspx -------------------------------------------------------------------------------- /MDT/Applications/Microsoft Office 365 C2R 2016/CustomSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MDT/Applications/Microsoft Office 365 C2R 2016/Readme_O365_2016.txt: -------------------------------------------------------------------------------- 1 | Download the Office 365 2016 administrative setup installer from: 2 | http://www.microsoft.com/en-us/download/details.aspx?id=49117 3 | 4 | Run downloaded "OfficeDeploymentTool.exe" and extract to this folder using setup.exe: 5 | setup.exe /download \\server\Share\MDT\Applications\Microsoft Office 365 C2R 2016\CustomSettings.xml 6 | 7 | 8 | More O365 Administrative setup information can be found here: 9 | https://technet.microsoft.com/en-us/library/jj219424.aspx -------------------------------------------------------------------------------- /MDT/Applications/Microsoft Office ProPlus 2013/Readme_Office_2013.txt: -------------------------------------------------------------------------------- 1 | Place your Office 2013 Standard, Professional, or ProPlus installation contents in this folder. 2 | 3 | If you wish to install other Office 2013 components like Visio, Project, and/or SharePoint Designer, 4 | copy the contents of those into this folder as well (overwriting files/folders when prompted). -------------------------------------------------------------------------------- /MDT/Applications/Microsoft Office ProPlus 2016/Readme_Office_2016.txt: -------------------------------------------------------------------------------- 1 | Place your Office 2016 Standard, Professional, or ProPlus installation contents in this folder. 2 | 3 | If you wish to install other Office 2016 components like Visio, Project, and/or SharePoint Designer, 4 | copy the contents of those into this folder as well (overwriting files/folders when prompted). -------------------------------------------------------------------------------- /MDT/Applications/Microsoft Windows Performance Toolkit 10 10240/Readme_WPT.txt: -------------------------------------------------------------------------------- 1 | Note - the Windows 10 10240 ADK appears to have been removed from the Microsoft download center. 2 | If you already have a copy, fantastic. If not, it may be available from non-Microsoft sources of questionable legality. 3 | 4 | The files should be placed in this folder once the ADK has been downloaded - the files are 5 | WPTx64-x86_en-us.msi and WPTx86-x86_en-us.msi (change languages as appropriate). 6 | These can be found in the download or install location. -------------------------------------------------------------------------------- /MDT/Applications/Microsoft Windows Performance Toolkit 10 10586/Readme_WPT.txt: -------------------------------------------------------------------------------- 1 | The Windows Performance Toolkit MSI packages can be downloaded via the Windows 10 ADK: 2 | http://go.microsoft.com/fwlink/p/?LinkId=526740 3 | 4 | The files should be placed in this folder once the ADK has been downloaded - the files are 5 | WPTx64-x86_en-us.msi and WPTx86-x86_en-us.msi (change languages as appropriate). 6 | These can be found in the download or install location. -------------------------------------------------------------------------------- /MDT/Applications/Microsoft Windows Performance Toolkit 8.1/Readme_WPT.txt: -------------------------------------------------------------------------------- 1 | The Windows Performance Toolkit MSI packages can be downloaded via the Windows 8.1 ADK: 2 | http://www.microsoft.com/en-us/download/details.aspx?id=39982 3 | 4 | The files should be placed in this folder once the ADK has been downloaded - the files are 5 | WPTx64-x86_en-us.msi and WPTx86-x86_en-us.msi (change languages as appropriate). 6 | These can be found in the download or install location. -------------------------------------------------------------------------------- /MDT/Bootstrap.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | Priority=Default, DefaultGateway 3 | 4 | [Default] 5 | SkipBDDWelcome=YES 6 | UserID=mdtuser 7 | UserDomain=domain 8 | UserPassword=Password 9 | 10 | [DefaultGateway] 11 | 10.1.10.1=SITE01 12 | 10.2.10.1=SITE02 13 | 14 | [Site01] 15 | DeployRoot=\\SITE01SERVER\DeploymentShare$ 16 | 17 | [Site02] 18 | DeployRoot=\\SITE02SERVER\DeploymentShare$ 19 | -------------------------------------------------------------------------------- /MDT/CreateMDTShare.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | This script creates an MDT deployment share. 4 | 5 | .DESCRIPTION 6 | This script creates an MDT deployment share with default task sequences. 7 | 8 | Note that you may need to edit the CustomSettings.xml file in MDT\Applications\Microsoft Office 365 C2R 2016\ if adding Office365 9 | via this script, so that it points to the correct share and folder name in your deployment share. 10 | 11 | You may also need to edit the ChangeWallpaper.ps1 script to point to your deployment share. You may also wish to replace the file 12 | \MDT\MDTScripts\img0.jpg with your own wallpaper image. 13 | 14 | 15 | 16 | // ************* 17 | // * CAUTION * 18 | // ************* 19 | 20 | Please review this script THOROUGHLY before applying, and disable changes below as necessary to suit your current environment. 21 | 22 | This script is provided AS-IS - usage of this source assumes that you are at the very least familiar with PowerShell, and the 23 | tools used to create and debug this script. 24 | 25 | In other words, if you break it, you get to keep the pieces. 26 | 27 | .EXAMPLE 28 | .\CreateMDTShare.ps1 29 | 30 | .NOTES 31 | Author: Carl Luberti 32 | Last Update: 27th November 2013 33 | Version: 1.0.0 34 | #> 35 | 36 | 37 | # Variables 38 | 39 | # Share where source will be pulled from 40 | $DataShare = "\\Server\Share" 41 | 42 | # Folder locally where deployment share will be created 43 | $MDTFolderPath = "X:\_Build" 44 | 45 | # Name of the deployment share in MDT Deployment Workbench 46 | $MDTShareName = "Build" 47 | 48 | # Install prereqs (True/False) 49 | $ADK = "True" 50 | $MDT = "True" 51 | 52 | # Install WDS (True/False) 53 | $WDS = "False" 54 | 55 | 56 | 57 | # Create folder for Deployment Share 58 | If (Test-Path $MDTFolderPath) 59 | { 60 | Write-Error "Folder $MDTFolderPath already exists - exiting!" -ForegroundColor Yellow 61 | Exit 62 | } 63 | Write-Host "Creating $MDTFolderPath..." -ForegroundColor Cyan 64 | New-Item -Path $MDTFolderPath -ItemType directory | Out-Null 65 | 66 | 67 | 68 | # Install ADK/MDT/WDS 69 | #ADK 70 | If ($ADK -eq "True") 71 | { 72 | $Mount = (Mount-DiskImage -ImagePath "$DataShare\ISO\MDT\ADK10_10240.iso" -StorageType ISO -PassThru | Get-Volume).DriveLetter 73 | $Drive = $Mount + ":" 74 | 75 | Write-Host "Installing ADK..." -ForegroundColor Cyan 76 | Start-Process -wait "$Drive\adksetup.exe" -ArgumentList "/features OptionId.DeploymentTools OptionId.WindowsPreinstallationEnvironment OptionId.ImagingAndConfigurationDesigner OptionId.UserStateMigrationTool /norestart /quiet /ceip off" 77 | Start-Sleep -Seconds 5 78 | Dismount-DiskImage -ImagePath "$DataShare\ISO\MDT\ADK10_10240.iso" 79 | } 80 | 81 | #MDT 82 | If ($MDT -eq "True") 83 | { 84 | Write-Host "Installing MDT..." -ForegroundColor Cyan 85 | $Mount = (Mount-DiskImage -ImagePath "$DataShare\ISO\MDT\MDT2013U1.iso" -StorageType ISO -PassThru | Get-Volume).DriveLetter 86 | $Drive = $Mount + ":" 87 | 88 | Start-Process -wait "msiexec" -ArgumentList "/i $Drive\MicrosoftDeploymentToolkit2013_x64.msi /qb!" 89 | Start-Sleep -Seconds 5 90 | Dismount-DiskImage -ImagePath "$DataShare\ISO\MDT\MDT2013U1.iso" 91 | } 92 | 93 | #WDS 94 | If ($WDS -eq "True") 95 | { 96 | Write-Host "Installing WDS..." -ForegroundColor Cyan 97 | If ((Get-CimInstance Win32_OperatingSystem).Caption -like "*2012*") 98 | { 99 | Install-WindowsFeature -Name WDS -IncludeAllSubFeature -IncludeManagementTools 100 | } 101 | Else 102 | { 103 | Write-Host "MDT 2013 Update 1 requires server 2012 or higher to properly support UEFI, and Server 2012R2 for Windows 10 support" -ForegroundColor Cyan 104 | Write-Host "Windows Server 2012 or 2012R2 not found, skipping WDS install." -ForegroundColor Cyan 105 | Write-Host "" 106 | Write-Host "You may choose to install it via Server Manager or PowerShell after this script completes if this is in error, or" -ForegroundColor Cyan 107 | Write-Host "You wish to run Server 2008 or 2008R2 WDS." -ForegroundColor Cyan 108 | } 109 | } 110 | 111 | 112 | # Import MDT PowerShell module 113 | Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1" 114 | 115 | 116 | 117 | # Create SMB Share 118 | Write-Host "Creating SMB Share $MDTShareName$..." -ForegroundColor Cyan 119 | New-SmbShare -Name "$MDTShareName$" -Path $MDTFolderPath | Out-Null 120 | Grant-SmbShareAccess -Name "$MDTShareName$" -AccountName Everyone -AccessRight Full –Force | Out-Null 121 | 122 | 123 | 124 | # Set Deployment Share as permanent in Deployment Workbench for current user, add custom settings 125 | Write-Host "Copying custom content to $MDTFolderPath\Control and $MDTFolderPath\Scripts..." -ForegroundColor Cyan 126 | New-PSDrive -Name "DS001" -PSProvider "MDTProvider" -Root $MDTFolderPath -Description $MDTShareName -NetworkPath "\\$env:COMPUTERNAME\$MDTShareName$" | Add-MDTPersistentDrive | Out-Null 127 | Copy-Item -Path "$DataShare\MDT\MDTScripts\*" -Recurse -Destination "$MDTFolderPath\Scripts" -Force 128 | Copy-Item -Path "$DataShare\MDT\CustomSettings.ini" -Destination "$MDTFolderPath\Control" -Force 129 | Copy-Item -Path "$DataShare\MDT\Bootstrap.ini" -Destination "$MDTFolderPath\Control" -Force 130 | Copy-Item -Path "$DataShare\MDT\Settings.xml" -Destination "$MDTFolderPath\Control" -Force 131 | Add-Content "$MDTFolderPath\Control\Bootstrap.ini" "`r`n" 132 | Add-Content "$MDTFolderPath\Control\Bootstrap.ini" "DeployRoot=\\$env:COMPUTERNAME\$MDTShareName$" 133 | Add-Content "$MDTFolderPath\Control\CustomSettings.ini" "`r`n" 134 | Add-Content "$MDTFolderPath\Control\CustomSettings.ini" "BackupShare=\\$env:COMPUTERNAME\$MDTShareName$" 135 | 136 | # Config WinPE settings 137 | Write-Host "Updating WinPE settings for $MDTShareName share..." -ForegroundColor Cyan 138 | $SettingsXML = "$MDTFolderPath\Control\Settings.xml" 139 | $xml = [xml](Get-Content $SettingsXML) 140 | $xml.Settings.UNCPath="\\$env:COMPUTERNAME\$MDTShareName$" 141 | $xml.Settings.PhysicalPath="$MDTFolderPath" 142 | $xml.Settings."Boot.x86.UseBootWim"="False" 143 | $xml.Settings."Boot.x86.GenerateGenericWIM"="False" 144 | $xml.Settings."Boot.x86.GenerateGenericISO"="False" 145 | $xml.Settings."Boot.x86.GenerateLiteTouchISO"="False" 146 | $xml.Settings."Boot.x86.SelectionProfile"="Nothing" 147 | $xml.Settings."Boot.x86.LiteTouchWIMDescription"="$MDTShareName WinPE (x64)" 148 | $xml.Settings."Boot.x86.LiteTouchISOName"="$MDTShareName-WinPE-x86.iso" 149 | $xml.Settings."Boot.x86.SelectionProfile"="Nothing" 150 | $xml.Settings."Boot.x64.UseBootWim"="False" 151 | $xml.Settings."Boot.x64.GenerateGenericWIM"="False" 152 | $xml.Settings."Boot.x64.GenerateGenericISO"="False" 153 | $xml.Settings."Boot.x64.GenerateLiteTouchISO"="False" 154 | $xml.Settings."Boot.x64.SelectionProfile"="Nothing" 155 | $xml.Settings."Boot.x64.LiteTouchWIMDescription"="$MDTShareName WinPE (x64)" 156 | $xml.Settings."Boot.x64.LiteTouchISOName"="$MDTShareName-WinPE-x64.iso" 157 | $xml.Settings."Boot.x64.SelectionProfile"="Nothing" 158 | $xml.Save($SettingsXML) 159 | 160 | 161 | 162 | # Create PE WIMs 163 | Write-Host "Updating WinPE WIMs for deployment share $MDTShareName..." -ForegroundColor Cyan 164 | Update-MDTDeploymentShare -path "DS001:" -Force 165 | 166 | 167 | 168 | # Add OS from ISO 169 | Function Add-OS { 170 | param($ISO, $OSVersion, $DestinationFolder, $Architecture, $Template) 171 | 172 | $Mount = (Mount-DiskImage -ImagePath $ISO -StorageType ISO -PassThru | Get-Volume).DriveLetter 173 | $Drive = $Mount + ":" 174 | 175 | If (!(Test-Path "DS001:\Operating Systems\$OSVersion")) 176 | { 177 | New-Item -path "DS001:\Operating Systems" -enable "True" -Name $OSVersion -Comments "" -ItemType "folder" | Out-Null 178 | } 179 | 180 | If (!(Test-Path "DS001:\Operating Systems\$OSVersion\$Architecture")) 181 | { 182 | New-Item -path "DS001:\Operating Systems\$OSVersion" -enable "True" -Name $Architecture -Comments "" -ItemType "folder" | Out-Null 183 | } 184 | Import-MdtOperatingSystem -path "DS001:\Operating Systems\$OSVersion\$Architecture" -SourcePath $Drive -DestinationFolder "$DestinationFolder$Architecture" | Out-Null 185 | Dismount-DiskImage -ImagePath $ISO 186 | 187 | If (!(Test-Path "DS001:\Task Sequences\$OSVersion")) 188 | { 189 | New-Item -path "DS001:\Task Sequences" -enable "True" -Name $OSVersion -Comments "" -ItemType "folder"| Out-Null 190 | } 191 | $OSWIMs = Get-ChildItem -Path "DS001:\Operating Systems\$OSVersion\$Architecture" -Recurse 192 | ForEach ($OSWIM in $OSWIMs) 193 | { 194 | $TSOS = $OSWIM.Name 195 | $TSName = $OSWIM.Description 196 | $Date = Get-Date -Format yyyy.MM.dd.HHmm 197 | 198 | # Server SKUs 199 | If ($OSWIM.ImageName -like "*SERVERSTANDARDCORE") 200 | { 201 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-STDCORE-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 202 | } 203 | ElseIf ($OSWIM.ImageName -like "*SERVERSTANDARD") 204 | { 205 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-STD-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 206 | } 207 | ElseIf ($OSWIM.ImageName -like "*SERVERDATACENTERCORE") 208 | { 209 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-DCCORE-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 210 | } 211 | ElseIf ($OSWIM.ImageName -like "*SERVERDATACENTER") 212 | { 213 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-DC-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 214 | } 215 | ElseIf ($OSWIM.ImageName -like "*SERVERENTERPRISECORE") 216 | { 217 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-ENTCORE-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 218 | } 219 | ElseIf ($OSWIM.ImageName -like "*SERVERENTERPRISE") 220 | { 221 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-ENT-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 222 | } 223 | ElseIf ($OSWIM.ImageName -like "*SERVERWEBCORE") 224 | { 225 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-WEBCORE-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 226 | } 227 | ElseIf ($OSWIM.ImageName -like "*SERVERWEB") 228 | { 229 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-WEB-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 230 | } 231 | # Client SKUs 232 | Elseif ($OSWIM.Flags -like "*Enterprise*") 233 | { 234 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-ENT-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 235 | } 236 | Elseif ($OSWIM.Flags -like "*Professional*") 237 | { 238 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder-PRO-$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 239 | } 240 | # Fallback 241 | Else 242 | { 243 | Import-MdtTaskSequence -path "DS001:\Task Sequences\$OSVersion" -Name "$TSName $Architecture" -Template "$Template.xml" -Comments "" -ID "$DestinationFolder$Architecture" -Version "$Date" -OperatingSystemPath "DS001:\Operating Systems\$OSVersion\$Architecture\$TSOS" -FullName "User" -OrgName "Org" -HomePage "about:blank" -Verbose 244 | } 245 | } 246 | } 247 | 248 | # Add Hotfixes / Create Selection Profile 249 | Function Add-Packages { 250 | param($PackagePath, $OSVersion, $Architecture) 251 | 252 | If (!(Test-Path "DS001:\Packages\$OSVersion")) 253 | { 254 | New-Item -path "DS001:\Packages" -enable "True" -Name $OSVersion -Comments "" -ItemType "folder" | Out-Null 255 | } 256 | 257 | If (!(Test-Path "DS001:\Packages\$OSVersion\$Architecture")) 258 | { 259 | New-Item -path "DS001:\Packages\$OSVersion" -enable "True" -Name $Architecture -Comments "" -ItemType "folder" | Out-Null 260 | } 261 | Import-MdtPackage -path "DS001:\Packages\$OSVersion\$Architecture" -SourcePath $PackagePath | Out-Null 262 | New-Item -path "DS001:\Selection Profiles" -enable "True" -Name "$OSVersion $Architecture" -Comments "" -Definition "" -ReadOnly "False" | Out-Null 263 | } 264 | 265 | # Add Applications 266 | Function Add-ApplicationWithSource { 267 | param($Vendor, $Application, $Name, $ShortName, $Architecture, $Command, $AppFolder, $SourcePath) 268 | 269 | If (!(Test-Path "DS001:\Applications\$Vendor")) 270 | { 271 | New-Item -path "DS001:\Applications" -enable "True" -Name "$Vendor" -Comments "" -ItemType "folder" | Out-Null 272 | } 273 | 274 | If (!(Test-Path "DS001:\Applications\$Vendor\$Application")) 275 | { 276 | New-Item -path "DS001:\Applications\$Vendor" -enable "True" -Name "$Application" -Comments "" -ItemType "folder" | Out-Null 277 | } 278 | Import-MdtApplication -path "DS001:\Applications\$Vendor\$Application" -enable "True" -Name "$Name" -ShortName "$Shortname" -Version $Architecture -Publisher $Vendor -Language "" -CommandLine "$Command" -WorkingDirectory ".\Applications\$AppFolder" -ApplicationSourcePath "$SourcePath" -DestinationFolder "$AppFolder" | Out-Null 279 | } 280 | 281 | Function Add-ApplicationWithoutSource { 282 | param($Vendor, $Application, $Name, $ShortName, $Architecture, $Command, $AppFolder) 283 | 284 | If (!(Test-Path "DS001:\Applications\$Vendor")) 285 | { 286 | New-Item -path "DS001:\Applications" -enable "True" -Name "$Vendor" -Comments "" -ItemType "folder" | Out-Null 287 | } 288 | 289 | If (!(Test-Path "DS001:\Applications\$Vendor\$Application")) 290 | { 291 | New-Item -path "DS001:\Applications\$Vendor" -enable "True" -Name "$Application" -Comments "" -ItemType "folder" | Out-Null 292 | } 293 | Import-MdtApplication -path "DS001:\Applications\$Vendor\$Application" -enable "True" -Name "$Name" -ShortName "$Shortname" -Version $Architecture -Publisher $Vendor -Language "" -CommandLine "$Command" -WorkingDirectory ".\Applications\$AppFolder" -NoSource | Out-Null 294 | } 295 | 296 | 297 | 298 | # ISOs 299 | $Win7x86ISO = "$DataShare\ISO\Windows\Client\Win7\Win7_Ent_SP1_x86.iso" 300 | $Win7x64ISO = "$DataShare\ISO\Windows\Client\Win7\Win7_Ent_SP1_x64.iso" 301 | $Win81x861ISO = "$DataShare\ISO\Windows\Client\Win81\Win81_Ent_Update1_x86.iso" 302 | $Win81x641ISO = "$DataShare\ISO\Windows\Client\Win81\Win81_Ent_Update1_x64.iso" 303 | $Win10x86ISO = "$DataShare\ISO\Windows\Client\Win10\10586\Win10_Ent_x86.iso" 304 | $Win10x64ISO = "$DataShare\ISO\Windows\Client\Win10\10586\Win10_Ent_x64.iso" 305 | $Win2008R2ISO = "$DataShare\ISO\Windows\Server\2008R2\x64\WindowsServer2008R2SP1.iso" 306 | $Win2012ISO = "$DataShare\ISO\Windows\Server\2012\x64\WindowsServer2012.iso" 307 | $Win2012R2ISO = "$DataShare\ISO\Windows\Server\2012R2\x64\WindowsServer2012R2_Update1.iso" 308 | 309 | # Windows 7 310 | Write-Host "Adding Windows 7 to deployment share $MDTShareName..." -ForegroundColor Cyan 311 | Add-OS $Win7x86ISO "Windows 7" "W7ENTSP1" "x86" "Client" 312 | Add-OS $Win7x64ISO "Windows 7" "W7ENTSP1" "x64" "Client" 313 | # Windows 8.1 314 | Write-Host "Adding Windows 8.1 to deployment share $MDTShareName..." -ForegroundColor Cyan 315 | Add-OS $Win81x861ISO "Windows 8.1" "W81ENTU1" "x86" "Client" 316 | Add-OS $Win81x641ISO "Windows 8.1" "W81ENTU1" "x64" "Client" 317 | # Windows 10 318 | Write-Host "Adding Windows 10 to deployment share $MDTShareName..." -ForegroundColor Cyan 319 | Add-OS $Win10x86ISO "Windows 10" "W10ENT10586" "x86" "Client" 320 | Add-OS $Win10x64ISO "Windows 10" "W10ENT10586" "x64" "Client" 321 | # Windows Server 2008R2 322 | Write-Host "Adding Windows Server 2008R2 to deployment share $MDTShareName..." -ForegroundColor Cyan 323 | Add-OS $Win2008R2ISO "Windows Server 2008R2" "W2008R2SP1" "x64" "Server" 324 | # Windows Server 2012 325 | Write-Host "Adding Windows Server 2012 to deployment share $MDTShareName..." -ForegroundColor Cyan 326 | Add-OS $Win2012ISO "Windows Server 2012" "W2012" "x64" "Server" 327 | # Windows Server 2012R2 328 | Write-Host "Adding Windows Server 2012R2 to deployment share $MDTShareName..." -ForegroundColor Cyan 329 | Add-OS $Win2012R2ISO "Windows Server 2012R2" "W2012R2U1" "x64" "Server" 330 | 331 | 332 | <# 333 | # Patches / packages here 334 | Write-Host "Adding patches/hotfixes for Windows 7 / IE11 to deployment share $MDTShareName..." -ForegroundColor Cyan 335 | Add-Packages "$DataShare\MDT\Packages" "Windows 7" "x64" 336 | 337 | 338 | 339 | # Applications here 340 | ########################## 341 | ## Internet Explorer 11 ## 342 | ########################## 343 | $Vendor = "Microsoft" 344 | $Application = "Internet Explorer" 345 | $Version = "11" 346 | $Architecture = "x64" 347 | $Name = "$Vendor $Application $Version $Architecture" 348 | $ShortName = "$Application $Version" 349 | $InstallCommand = "IE11-Windows6.1-x64-en-us.exe /passive /update-no /norestart" 350 | $AppFolder = "MSIE11x64" 351 | $SourcePath = "$DataShare\MDT\Applications\Microsoft Internet Explorer 11" 352 | Write-Host "Adding IE11 to deployment share $MDTShareName..." -ForegroundColor Cyan 353 | Add-ApplicationWithSource $Vendor $Application $Name $Shortname $Architecture $InstallCommand $AppFolder $SourcePath 354 | 355 | ######################### 356 | ## Office 2016 ProPlus ## 357 | ######################### 358 | $Vendor = "Microsoft" 359 | $Application = "Office 2016" 360 | $Version = "ProPlus" 361 | $Architecture = "x86" 362 | $Name = "$Vendor $Application $Version $Architecture" 363 | $ShortName = "$Application $Version" 364 | $InstallCommand = "setup.exe /config proplus.ww\config.xml" 365 | $AppFolder = "MSO2016x86" 366 | $SourcePath = "$DataShare\MDT\Applications\Microsoft Office ProPlus 2016" 367 | Write-Host "Adding Office 2016 to deployment share $MDTShareName..." -ForegroundColor Cyan 368 | Add-ApplicationWithSource $Vendor $Application $Name $ShortName $Architecture $InstallCommand $AppFolder $SourcePath 369 | 370 | $Vendor = "Microsoft" 371 | $Application = "Visio 2016" 372 | $Version = "Professional" 373 | $Architecture = "x86" 374 | $Name = "$Vendor $Application $Version $Architecture" 375 | $ShortName = "$Application $Version" 376 | $InstallCommand = "setup.exe /config vispro.ww\config.xml" 377 | $AppFolder = "MSO2016x86" 378 | Write-Host "Adding Visio 2016 Professional to deployment share $MDTShareName..." -ForegroundColor Cyan 379 | Add-ApplicationWithoutSource $Vendor "Office 2016" $Name $ShortName $Architecture $InstallCommand $AppFolder 380 | 381 | $Vendor = "Microsoft" 382 | $Application = "Project 2016" 383 | $Version = "Professional" 384 | $Architecture = "x86" 385 | $Name = "$Vendor $Application $Version $Architecture" 386 | $ShortName = "$Application $Version" 387 | $InstallCommand = "setup.exe /config prjpro.ww\config.xml" 388 | $AppFolder = "MSO2016x86" 389 | Write-Host "Adding Project 2016 Professional to deployment share $MDTShareName..." -ForegroundColor Cyan 390 | Add-ApplicationWithoutSource $Vendor "Office 2016" $Name $ShortName $Architecture $InstallCommand $AppFolder 391 | 392 | ########################## 393 | ## Windows Perf Toolkit ## 394 | ########################## 395 | $Vendor = "Microsoft" 396 | $Application = "Windows Performance Toolkit" 397 | $Version = "8.1" 398 | $Architecture = "x64" 399 | $Name = "$Vendor $Application $Version $Architecture" 400 | $ShortName = "$Application $Version" 401 | $InstallCommand = "msiexec /i WPTx64-x86_en-us.msi /qb!" 402 | $AppFolder = "WPT81" 403 | $SourcePath = "$DataShare\MDT\Applications\Microsoft Windows Performance Toolkit 8.1" 404 | Write-Host "Adding WPT 8.1 to deployment share $MDTShareName..." -ForegroundColor Cyan 405 | Add-ApplicationWithSource $Vendor $Application $Name $ShortName $Architecture $InstallCommand $AppFolder $SourcePath 406 | 407 | $Vendor = "Microsoft" 408 | $Application = "Windows Performance Toolkit" 409 | $Version = "10.0 10240" 410 | $Architecture = "x64" 411 | $Name = "$Vendor $Application $Version $Architecture" 412 | $ShortName = "$Application $Version" 413 | $InstallCommand = "msiexec /i WPTx64-x86_en-us.msi /qb!" 414 | $AppFolder = "WPT10-10240" 415 | $SourcePath = "$DataShare\MDT\Applications\Microsoft Windows Performance Toolkit 10 10240" 416 | Write-Host "Adding WPT 10 (10240) to deployment share $MDTShareName..." -ForegroundColor Cyan 417 | Add-ApplicationWithSource $Vendor $Application $Name $ShortName $Architecture $InstallCommand $AppFolder $SourcePath 418 | 419 | $Vendor = "Microsoft" 420 | $Application = "Windows Performance Toolkit" 421 | $Version = "10.0 10586" 422 | $Architecture = "x64" 423 | $Name = "$Vendor $Application $Version $Architecture" 424 | $ShortName = "$Application $Version" 425 | $InstallCommand = "msiexec /i WPTx64-x86_en-us.msi /qb!" 426 | $AppFolder = "WPT10-10586" 427 | $SourcePath = "$DataShare\MDT\Applications\Microsoft Windows Performance Toolkit 10 10586" 428 | Write-Host "Adding WPT 10 (10586) to deployment share $MDTShareName..." -ForegroundColor Cyan 429 | Add-ApplicationWithSource $Vendor $Application $Name $ShortName $Architecture $InstallCommand $AppFolder $SourcePath 430 | #> 431 | 432 | 433 | # Clean up 434 | Write-Host "Updating WinPE WIMs for deployment share $MDTShareName..." -ForegroundColor Cyan 435 | Update-MDTDeploymentShare -path "DS001:" 436 | Remove-PSDrive -Name "DS001" 437 | 438 | 439 | # Done 440 | Write-Host "" 441 | Write-Host "" 442 | Write-Host "" 443 | Write-Host "Script complete. Check $MDTFolderPath and the Deployment Workbench to validate success." -ForegroundColor Cyan -------------------------------------------------------------------------------- /MDT/CustomSettings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | Priority=Default 3 | Properties=MyCustomProperty 4 | 5 | [Default] 6 | OSInstall=Y 7 | 8 | _SMSTSORGNAME=MDT Image Build/Capture 9 | _SMSTSPackageName=%TaskSequenceID% 10 | 11 | UserID=mdtuser 12 | UserDomain=domain 13 | UserPassword=Password 14 | 15 | OrgName=Organization 16 | FullName=User 17 | 18 | JoinWorkgroup=WORKGROUP 19 | ;JoinDomain=DOMAIN 20 | ;DomainAdmin=Administrator 21 | ;DomainAdminDomain=DOMAIN 22 | ;DomainAdminPassword=Password 23 | 24 | WSUSServer=http://WSUSSERVER:8530 25 | 26 | DriverSelectionProfile=Nothing 27 | DriverInjectionMode=ALL 28 | DriverGroup001=%Make%\%Model% 29 | DriverGroup002=%Make%\%Version% 30 | 31 | BDEInstallSupporess=YES 32 | ;BDEInstallSuppress=NO 33 | ;BDEInstall=TPMPin 34 | ;BDEKeyLocation=C: 35 | ;BDEPin=12345678 36 | ;BDERecoveryKey=AD 37 | ;BDEWaitForEncryption=FALSE 38 | 39 | UILanguage=en-us 40 | UserLocale=en-us 41 | KeyboardLocale=en-us;0409:00000409 42 | TimeZone=004 43 | TimeZoneName=Pacific Standard Time 44 | 45 | SkipAdminPassword=YES 46 | SkipApplications=YES 47 | SkipAppsOnUpgrade=YES 48 | SkipBDDWelcome=YES 49 | SkipBitLocker=YES 50 | SkipBitLockerDetails=YES 51 | SkipCapture=YES 52 | SkipComputerName=YES 53 | SkipDomainMembership=YES 54 | SkipFinalSummary=NO 55 | SkipLocaleSelection=YES 56 | SkipPackageDisplay=YES 57 | SkipProductKey=YES 58 | SkipRoles=YES 59 | SkipSummary=YES 60 | SkipTaskSequence=NO 61 | SkipTimeZone=YES 62 | SkipUserData=YES 63 | 64 | UserDataLocation=NONE 65 | FinishAction= 66 | 67 | DoCapture=NO 68 | ComputerBackupLocation=NETWORK 69 | BackupDir=Captures 70 | BackupFile=%TaskSequenceID%_#month(date) & "-" & day(date) & "-" & year(date)#.wim -------------------------------------------------------------------------------- /MDT/MDTScripts/AMD64/readme_powercfg.txt: -------------------------------------------------------------------------------- 1 | Place 64bit powercfg.exe from a Windows 10 64bit install (\Windows\System32\) here to change the power scheme to high perf during deployment: 2 | http://blogs.technet.com/b/deploymentguys/archive/2015/03/27/reducing-windows-deployment-time-using-power-management.aspx 3 | 4 | 5 | Call from MDT task sequence as a "Run command" step during WinPE to execute (run after "Gather Local" steps): 6 | %SCRIPTROOT%\%PROCESSOR_ARCHITECTURE%\powercfg.exe /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c -------------------------------------------------------------------------------- /MDT/MDTScripts/ChangeWallpaper.ps1: -------------------------------------------------------------------------------- 1 | $DeployRoot="\\MDTServer\Build$" 2 | $ScriptRoot="\\MDTServer\Build$\Scripts" 3 | $Source="$ScriptRoot\img0.jpg" 4 | $Destination="C:\Windows\Web\Wallpaper\Windows" 5 | 6 | $Filepath = "C:\Windows\Web\wallpaper\windows" 7 | $Filename = $Filepath + "\img0.jpg" 8 | 9 | function setaccess 10 | { 11 | param($FileName) 12 | &takeown /F $FileName | Out-Null 13 | $User = [System.Security.Principal.WindowsIdentity]::GetCurrent().User 14 | $Acl = Get-Acl $FileName 15 | $Acl.SetOwner($User) 16 | $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($User, "FullControl", "Allow") 17 | $User = [System.Security.Principal.WindowsIdentity]::GetCurrent().User 18 | $Acl.SetAccessRule($AccessRule) 19 | $Filename = "\\{0}\{1}" -f $env:COMPUTERNAME,($filename -replace ':','$') 20 | Set-Acl $FileName $Acl 21 | } 22 | 23 | function Set-Wallpaper 24 | { 25 | param( 26 | [Parameter(Mandatory=$true)] 27 | $Path, 28 | 29 | [ValidateSet('Center', 'Stretch')] 30 | $Style = 'Stretch' 31 | ) 32 | 33 | Add-Type @" 34 | using System; 35 | using System.Runtime.InteropServices; 36 | using Microsoft.Win32; 37 | namespace Wallpaper 38 | { 39 | public enum Style : int 40 | { 41 | Center, Stretch 42 | } 43 | public class Setter { 44 | public const int SetDesktopWallpaper = 20; 45 | public const int UpdateIniFile = 0x01; 46 | public const int SendWinIniChange = 0x02; 47 | [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] 48 | private static extern int SystemParametersInfo (int uAction, int uParam, string lpvParam, int fuWinIni); 49 | public static void SetWallpaper ( string path, Wallpaper.Style style ) { 50 | SystemParametersInfo( SetDesktopWallpaper, 0, path, UpdateIniFile | SendWinIniChange ); 51 | RegistryKey key = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true); 52 | switch( style ) 53 | { 54 | case Style.Stretch : 55 | key.SetValue(@"WallpaperStyle", "2") ; 56 | key.SetValue(@"TileWallpaper", "0") ; 57 | break; 58 | case Style.Center : 59 | key.SetValue(@"WallpaperStyle", "1") ; 60 | key.SetValue(@"TileWallpaper", "0") ; 61 | break; 62 | } 63 | key.Close(); 64 | } 65 | } 66 | } 67 | "@ 68 | 69 | [Wallpaper.Setter]::SetWallpaper( $Path, $Style ) 70 | } 71 | 72 | setaccess $Filename 73 | 74 | Rename-Item -Path $Filename -NewName "C:\Windows\Web\Wallpaper\Windows\img1.jpg" -Force 75 | Copy-Item -Path $Source -Destination $Destination -Force 76 | 77 | Set-Wallpaper -Path $Filename -------------------------------------------------------------------------------- /MDT/MDTScripts/ConfigWin10.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | This script reconfigures Windows 10. 4 | 5 | .DESCRIPTION 6 | This script makes considerable changes to Windows 10. 7 | 8 | // ************* 9 | // * CAUTION * 10 | // ************* 11 | 12 | THIS SCRIPT MAKES CONSIDERABLE CHANGES TO THE DEFAULT CONFIGURATION OF WINDOWS 10. 13 | 14 | Please review this script THOROUGHLY before applying, and disable changes below as necessary to suit your current environment. 15 | 16 | This script is provided AS-IS - usage of this source assumes that you are at the very least familiar with PowerShell, and the 17 | tools used to create and debug this script. 18 | 19 | In other words, if you break it, you get to keep the pieces. 20 | 21 | 22 | .EXAMPLE 23 | .\ConfigWin10.ps1 24 | .NOTES 25 | Author: Carl Luberti 26 | Last Update: 18th November 2015 27 | Version: 1.0.1 28 | .LOG 29 | 1.0.1: Updated for TH2 30 | #> 31 | 32 | 33 | # Remove OneDrive (not guaranteed to be permanent - see https://support.office.com/en-US/article/Turn-off-or-uninstall-OneDrive-f32a17ce-3336-40fe-9c38-6efb09f944b0) 34 | # Note - best to run this after installing Office 2013/2016/365, as those may update or reinstall OneDrive: 35 | Write-Host "Removing OneDrive..." -ForegroundColor Yellow 36 | C:\Windows\SysWOW64\OneDriveSetup.exe /uninstall 37 | Start-Sleep -Seconds 30 38 | New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null 39 | New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\' -Name 'Skydrive' | Out-Null 40 | New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Skydrive' -Name 'DisableFileSync' -PropertyType DWORD -Value '1' | Out-Null 41 | New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Skydrive' -Name 'DisableLibrariesDefaultSaveToSkyDrive' -PropertyType DWORD -Value '1' | Out-Null 42 | Remove-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A52BBA46-E9E1-435f-B3D9-28DAA648C0F6}' -Recurse 43 | Remove-Item -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A52BBA46-E9E1-435f-B3D9-28DAA648C0F6}' -Recurse 44 | Set-ItemProperty -Path 'HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}' -Name 'System.IsPinnedToNameSpaceTree' -Value '0' 45 | Set-ItemProperty -Path 'HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}' -Name 'System.IsPinnedToNameSpaceTree' -Value '0' 46 | 47 | 48 | # Set PeerCaching to Local Network PCs only (1): 49 | Write-Host "Configuring PeerCaching..." -ForegroundColor Cyan 50 | Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config' -Name 'DODownloadMode' -Value '1' 51 | 52 | 53 | # Configure Services: 54 | Write-Host "Configuring Network List Service to start Automatic..." -ForegroundColor Green 55 | Set-Service netprofm -StartupType Automatic 56 | 57 | 58 | # Disable System Restore 59 | Write-Host "Disabling System Restore..." -ForegroundColor Green 60 | Disable-ComputerRestore -Drive "C:\" 61 | 62 | 63 | # Remove Previous Versions: 64 | Write-Host "Removing Previous Versions Capability..." -ForegroundColor Green 65 | Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' -Name 'NoPreviousVersionsPage' -Value '1' 66 | 67 | 68 | # Change Explorer Default View to Windows 7 defaults: 69 | Write-Host "Configuring Windows Explorer..." -ForegroundColor Green 70 | New-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'LaunchTo' -PropertyType DWORD -Value '1' | Out-Null 71 | 72 | 73 | # Configure Search Options: 74 | Write-Host "Configuring Search Options..." -ForegroundColor Green 75 | New-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search' -Name 'SearchboxTaskbarMode' -PropertyType DWORD -Value '1' | Out-Null -------------------------------------------------------------------------------- /MDT/MDTScripts/ConfigureIPv6.ps1: -------------------------------------------------------------------------------- 1 | #Set IPv6 settings to favor IPv4 and disable all transition interfaces 2 | function New-RegKey { 3 | param($key) 4 | 5 | $key = $key -replace ':','' 6 | $parts = $key -split '\\' 7 | 8 | $tempkey = '' 9 | $parts | ForEach-Object { 10 | $tempkey += ($_ + "\") 11 | if ( (Test-Path "Registry::$tempkey") -eq $false) { 12 | New-Item "Registry::$tempkey" | Out-Null 13 | } 14 | } 15 | } 16 | 17 | $RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters" 18 | New-RegKey $RegPath 19 | New-ItemProperty -Path $RegPath -Name "DisabledComponents" -Value 174 -PropertyType "DWORD" -Force -------------------------------------------------------------------------------- /MDT/MDTScripts/ConfigureWMI.ps1: -------------------------------------------------------------------------------- 1 | # Connect to the ProviderHostQuotaConfiguration base class of the root namespace 2 | $oWMI=get-wmiobject -Namespace root -Class __ProviderHostQuotaConfiguration 3 | 4 | # Set memory per WMI process to a max of 1GB (default is 512MB) 5 | $oWMI.MemoryPerHost=1024*1024*1024 6 | 7 | # Set max memory in use by WMI across all processes on the same machine to top off at 4GB (default is 1GB) 8 | $oWMI.MemoryAllHosts=4096*1024*1024 9 | 10 | # Commit changes back to the system 11 | $oWMI.put() 12 | 13 | # Move WMI into the COM Infrastructure startup group - this will improve WMI startup performance 14 | Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\Winmgmt -Name 'Group' -Value 'COM Infrastructure' 15 | 16 | # Set WMI to run in it's own svchost process in the event it needs to be debugged or restarted 17 | winmgmt /standalonehost 18 | -------------------------------------------------------------------------------- /MDT/MDTScripts/ConfigureWU.ps1: -------------------------------------------------------------------------------- 1 | # Run Windows Update service in a separate svchost process 2 | sc.exe config wuauserv type= own -------------------------------------------------------------------------------- /MDT/MDTScripts/DisableIEESC.ps1: -------------------------------------------------------------------------------- 1 | # Disable IE Enhanced Security on Server 2012/2012R2 2 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" -Name "IsInstalled" -Value 0 3 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" -Name "IsInstalled" -Value 0 -------------------------------------------------------------------------------- /MDT/MDTScripts/DisableServerManager.ps1: -------------------------------------------------------------------------------- 1 | #Disable Server Manager from opening at logon globally 2 | function New-RegKey { 3 | param($key) 4 | 5 | $key = $key -replace ':','' 6 | $parts = $key -split '\\' 7 | 8 | $tempkey = '' 9 | $parts | ForEach-Object { 10 | $tempkey += ($_ + "\") 11 | if ( (Test-Path "Registry::$tempkey") -eq $false) { 12 | New-Item "Registry::$tempkey" | Out-Null 13 | } 14 | } 15 | } 16 | 17 | $RegPath = "HKLM:\SOFTWARE\Microsoft\ServerManager" 18 | New-RegKey $RegPath 19 | New-ItemProperty -Path $RegPath -Name "DoNotOpenServerManagerAtLogon" -Value 1 -PropertyType "DWORD" -Force -------------------------------------------------------------------------------- /MDT/MDTScripts/DisableWUService.ps1: -------------------------------------------------------------------------------- 1 | sc.exe config wuauserv start= disabled -------------------------------------------------------------------------------- /MDT/MDTScripts/EnableMSUpdate.ps1: -------------------------------------------------------------------------------- 1 | #Enable Microsoft Update provider 2 | $MicrosoftUpdate = New-Object -ComObject Microsoft.Update.ServiceManager -Strict 3 | $MicrosoftUpdate.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"") -------------------------------------------------------------------------------- /MDT/MDTScripts/EnableRDP.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cluberti/MDT/266d6c51b385e6c2643af6f33a2640b2be2b9f0a/MDT/MDTScripts/EnableRDP.ps1 -------------------------------------------------------------------------------- /MDT/MDTScripts/EnableWUService.ps1: -------------------------------------------------------------------------------- 1 | sc.exe config wuauserv start= auto -------------------------------------------------------------------------------- /MDT/MDTScripts/Settings.xml: -------------------------------------------------------------------------------- 1 | 2 | True 3 | Build Share 4 | 5 | 6 | False 7 | True 8 | True 9 | \\MDTServer\Build$ 10 | X:\_Build 11 | 12 | 13 | 9800 14 | 9801 15 | True 16 | True 17 | 32 18 | False 19 | True 20 | True 21 | False 22 | False 23 | %INSTALLDIR%\Samples\Background.bmp 24 | 25 | 26 | False 27 | False 28 | Generic Windows PE (x86) 29 | Generic_x86.iso 30 | False 31 | Lite Touch Windows PE (x86) 32 | LiteTouchPE_x86.iso 33 | Nothing 34 | True 35 | winpe-mdac 36 | True 37 | 32 38 | False 39 | True 40 | True 41 | False 42 | False 43 | %INSTALLDIR%\Samples\Background.bmp 44 | 45 | 46 | False 47 | False 48 | Generic Windows PE (x64) 49 | Generic_x64.iso 50 | False 51 | Lite Touch Windows PE (x64) 52 | LiteTouchPE_x64.iso 53 | Nothing 54 | True 55 | winpe-mdac 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /MDT/MDTScripts/UACSettings.ps1: -------------------------------------------------------------------------------- 1 | #Set UAC parameters - no prompt for Admin, unfilter Admin tokens for remote admin tasks 2 | function New-RegKey { 3 | param($key) 4 | 5 | $key = $key -replace ':','' 6 | $parts = $key -split '\\' 7 | 8 | $tempkey = '' 9 | $parts | ForEach-Object { 10 | $tempkey += ($_ + "\") 11 | if ( (Test-Path "Registry::$tempkey") -eq $false) { 12 | New-Item "Registry::$tempkey" | Out-Null 13 | } 14 | } 15 | } 16 | 17 | $RegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" 18 | New-RegKey $RegPath 19 | New-ItemProperty -Path $RegPath -Name "ConsentPromptBehaviorAdmin" -Value 0 -PropertyType "DWORD" -Force 20 | New-ItemProperty -Path $RegPath -Name "LocalAccountTokenFilterPolicy" -Value 1 -PropertyType "DWORD" -Force -------------------------------------------------------------------------------- /MDT/MDTScripts/X86/readme_powercfg.txt: -------------------------------------------------------------------------------- 1 | Place 32bit powercfg.exe from a Windows 10 64bit install (\Windows\SysWOW64\) here to change the power scheme to high perf during deployment: 2 | http://blogs.technet.com/b/deploymentguys/archive/2015/03/27/reducing-windows-deployment-time-using-power-management.aspx 3 | 4 | 5 | Call from MDT task sequence as a "Run command" step during WinPE to execute (run after "Gather Local" steps): 6 | %SCRIPTROOT%\%PROCESSOR_ARCHITECTURE%\powercfg.exe /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c -------------------------------------------------------------------------------- /MDT/MDTScripts/ZTIGather.wsf: -------------------------------------------------------------------------------- 1 | 2 | 2236 | 2237 | -------------------------------------------------------------------------------- /MDT/MDTScripts/img0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cluberti/MDT/266d6c51b385e6c2643af6f33a2640b2be2b9f0a/MDT/MDTScripts/img0.jpg -------------------------------------------------------------------------------- /MDT/Packages/Readme_Packages.txt: -------------------------------------------------------------------------------- 1 | Place MSU or CAB files containing hotfixes, updates, or language packs into this folder. 2 | If adding x86 and x64 packages, or packages for multiple operating systems, edit the CreateMDTShare.ps1 script 3 | so that packages are placed in proper folder structures (as this will control Selection Profiles created via the script). -------------------------------------------------------------------------------- /MDT/Settings.xml: -------------------------------------------------------------------------------- 1 | 2 | True 3 | Build Share 4 | 5 | 6 | False 7 | True 8 | True 9 | \\MDT1\BuildShare$ 10 | M:\BuildShare 11 | 12 | 13 | 9800 14 | 9801 15 | True 16 | True 17 | 128 18 | False 19 | True 20 | True 21 | False 22 | False 23 | %INSTALLDIR%\Samples\Background.bmp 24 | 25 | 26 | False 27 | False 28 | Generic Windows PE (x86) 29 | Generic_x86.iso 30 | False 31 | Lite Touch Windows PE (x86) 32 | LiteTouchPE_x86.iso 33 | Nothing 34 | True 35 | winpe-mdac 36 | True 37 | 128 38 | False 39 | True 40 | True 41 | False 42 | False 43 | %INSTALLDIR%\Samples\Background.bmp 44 | 45 | 46 | False 47 | False 48 | Generic Windows PE (x64) 49 | Generic_x64.iso 50 | False 51 | Lite Touch Windows PE (x64) 52 | LiteTouchPE_x64.iso 53 | Nothing 54 | True 55 | winpe-mdac 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MDT 2 | Build script for a basic MDT install 3 | 4 | This script is a work-in-progress, but it does work on Server 2012R2 and Windows 10. I have not tested it downlevel, and I'd wager it probably wouldn't work on 2008R2 or Windows 7. 5 | 6 | This script makes some assumptions that you can see when reviewing it - it assumes you will provide a path to a folder that contains ISO files, as well as a folder with custom scripts (if you so choose) and a custom settings.xml file (which I will have in the repository along with some sample custom scripts). Feedback or changes/fixes always welcome. 7 | --------------------------------------------------------------------------------