2024-08-18 01:47:32 -05:00
#https://www.dannymoran.com/deploy-windows-11-with-mdt-and-wds/
#Thank you Danny <3
2024-08-18 02:41:04 -05:00
#need WDS for like 2 pieces
2024-08-17 21:27:36 -05:00
Install-WindowsFeature WDS
2024-08-18 02:41:04 -05:00
#dlownload and install MDT
2024-08-17 21:27:36 -05:00
Start-BitsTransfer " https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi " \ \ SynCloud \ Data \ Resources \ MDTx64 . msi
msiexec / i \ \ SynCloud \ Data \ Resources \ MDTx64 . msi / qn
2024-08-18 02:41:04 -05:00
#download the Assessment and Deployment Kit, and WinPE add-on
2024-08-17 21:27:36 -05:00
Start-BitsTransfer " https://download.microsoft.com/download/6/7/4/674ec7db-7c89-4f2b-8363-689055c2b430/adk/adksetup.exe " \ \ SynCloud \ Data \ Resources \ adksetup . exe
Start-BitsTransfer " https://download.microsoft.com/download/3/c/2/3c2b23b2-96a0-452c-b9fd-6df72266e335/adkwinpeaddons/adkwinpesetup.exe " \ \ SynCloud \ Data \ Resources \ adkwinpesetup . exe
2024-08-18 02:41:04 -05:00
#install them to a NOT C:\ location
2024-08-17 21:27:36 -05:00
cmd / c \ \ SynCloud \ Data \ Resources \ adksetup . exe / features + / q / installpath " T:\WinADK "
cmd / c \ \ SynCloud \ Data \ Resources \ adkwinpesetup . exe / features + / q / installpath " T:\WinADK "
Add-PSSnapIn Microsoft . BDD . PSSnapIn
2024-08-18 02:41:04 -05:00
mkdir T: \ DeploymentShare
2024-08-17 21:45:48 -05:00
2024-08-18 02:41:04 -05:00
#import the module
2024-08-17 21:45:48 -05:00
Import-Module " C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1 "
2024-08-18 02:41:04 -05:00
#mount the Deployment Share
2024-08-17 21:45:48 -05:00
New-PSDrive -Name " DS001 " -PSProvider MDTProvider -Root " T:\DeploymentShare "
2024-08-18 02:41:04 -05:00
#add Operating System Folder
2024-08-17 21:47:17 -05:00
new-item -path " DS001:\Operating Systems " -enable " True " -Name " Windows10auto " -Comments " For Old People " -ItemType " folder " -Verbose
2024-08-17 21:45:48 -05:00
#mount the windows ISO
$info = Mount-DiskImage -ImagePath " \\SynCloud\Data\Resources\Win10_22H2_English_x64.iso "
2024-08-17 21:50:24 -05:00
$Drive = ( $info | get-volume )
2024-08-17 21:45:48 -05:00
$Source = $Drive . DriveLetter + " :\ "
#import OS
2024-08-17 21:55:56 -05:00
import-mdtoperatingsystem -path " DS001:\Operating Systems\Windows10auto " -SourcePath $Source -DestinationFolder " Windows 10 x64 auto " -Verbose
#unmount the ISO
Dismount-DiskImage -ImagePath " \\SynCloud\Data\Resources\Win10_22H2_English_x64.iso "
2024-08-17 22:55:36 -05:00
#grab the driver pack
#https://www.dell.com/support/kbdoc/en-us/000109785/dell-command-deploy-driver-packs-for-optiplex-models
#for dell optiplex 3070
New-Item -ItemType Directory -Force -Path \ \ SynCloud \ Data \ Resources \ Dell \ Driver \ 3070 \
Start-BitsTransfer " https://downloads.dell.com/FOLDER08644749M/1/3070-0DFFN_Win10_1.0_A09.exe " \ \ SynCloud \ Data \ Resources \ Dell \ Driver \ 3070 \ 3070 - 0DFFN_Win10_1 . 0_A09 . exe
cmd / c \ \ SynCloud \ Data \ Resources \ Dell \ Driver \ 3070 \ 3070 - 0DFFN_Win10_1 . 0_A09 . exe / s / e = \ \ SynCloud \ Data \ Resources \ Dell \ Driver \ 3070 \
#^that takes a while, consider doing it locally
2024-08-18 00:38:25 -05:00
2024-08-18 02:41:04 -05:00
#install the drivers to Out-of-Box DeploymentShare
new-item -path " DS001:\Out-of-Box Drivers " -enable " True " -Name " Optiplex3070 " -Comments " Put em in a folder ya Dingus " -ItemType " folder " -Verbose
import-mdtdriver -path " DS001:\Out-of-Box Drivers\Optiplex3070 " -SourcePath " \\SynCloud\Data\Resources\Dell\Driver\3070\3070 " -ImportDuplicates -Verbose
#all together now, for virtio proxmox drivers
2024-08-18 00:38:25 -05:00
$info = Mount-DiskImage -ImagePath " \\SynCloud\Data\Resources\virtio-win-0.1.262.iso "
$Drive = ( $info | get-volume )
$Source = $Drive . DriveLetter + " :\ "
new-item -path " DS001:\Out-of-Box Drivers " -enable " True " -Name " Virtio " -Comments " Put em in a folder ya Dingus " -ItemType " folder " -Verbose
import-mdtdriver -path " DS001:\Out-of-Box Drivers\Virtio " -SourcePath $Source -ImportDuplicates -Verbose
Dismount-DiskImage -ImagePath " \\SynCloud\Data\Resources\virtio-win-0.1.262.iso "
2024-08-17 23:07:04 -05:00
2024-08-17 22:55:36 -05:00
#make the Task Sequence
import-mdttasksequence -path " DS001:\Task Sequences " -Name " Windows 10 Pro x64 " -Template " Client.xml " -Comments " Here we go " -ID " Win10Pro " -Version " 1.0 " -OperatingSystemPath " DS001:\Operating Systems\Windows10\Windows 10 Pro in Windows 10 x64 install.wim " -FullName " MDT User " -OrgName " UG " -HomePage " about:blank " -Verbose
2024-08-17 21:55:56 -05:00
2024-08-18 02:41:04 -05:00
#Go do the INI updates and properties manually (sad)
2024-08-17 23:07:04 -05:00
#Update the deployment share
2024-08-17 23:10:41 -05:00
update-MDTDeploymentShare -path " DS001: " -Force -Verbose