2024-08-17 21:27:36 -05:00
Install-WindowsFeature WDS
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
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
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
Import-Module 'C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1'
mkdir T: \ DeploymentShare
#new-PSDrive -Name "MDT" -PSProvider "MDTProvider" -Root "T:\DeploymentShare" -Description "MDT Deployment Share" -NetworkPath "\\ema\DeploymentShare$" -Verbose | add-MDTPersistentDrive -Verbose
#import-mdtoperatingsystem -path "MDT:\Operating Systems" -SourcePath "T:\Deploymentshare\Operating Systems\Windows 7 x64" -DestinationFolder "Windows 7 x64" -Verbose
#import-mdtdriver -path "MDT:\Out-of-Box Drivers" -SourcePath "T:\Drivers" -ImportDuplicates -Verbose
#update-MDTDeploymentShare -path "MDT:" -Verbose
#import-mdtoperatingsystem -path "MDT:\Operating Systems" -SourcePath "T:\Deploymentshare\Operating Systems\Windows 7 x64" -DestinationFolder "Windows 7 x64" -Verbose
2024-08-17 21:45:48 -05:00
#
#add Operating System Folder
Import-Module " C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1 "
New-PSDrive -Name " DS001 " -PSProvider MDTProvider -Root " T:\DeploymentShare "
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
Import-Module " C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1 "
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
#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
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-17 23:07:04 -05:00
#Go do the INI updates manually (sad)
#Update the deployment share
2024-08-17 23:10:41 -05:00
update-MDTDeploymentShare -path " DS001: " -Force -Verbose