Update setupMDT.ps1

This commit is contained in:
Upgrayedd 2024-08-17 21:47:17 -05:00
parent fec0589cef
commit fa33fb186b

View file

@ -23,7 +23,7 @@ mkdir T:\DeploymentShare
#add Operating System Folder #add Operating System Folder
Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1" Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"
New-PSDrive -Name "DS001" -PSProvider MDTProvider -Root "T:\DeploymentShare" New-PSDrive -Name "DS001" -PSProvider MDTProvider -Root "T:\DeploymentShare"
new-item -path "DS001:\Operating Systems" -enable "True" -Name "Windows10" -Comments "For Old People" -ItemType "folder" -Verbose new-item -path "DS001:\Operating Systems" -enable "True" -Name "Windows10auto" -Comments "For Old People" -ItemType "folder" -Verbose
#mount the windows ISO #mount the windows ISO
Mount-DiskImage -ImagePath "\\SynCloud\Data\Resources\Win10_22H2_English_x64.iso" | Get-Volume Mount-DiskImage -ImagePath "\\SynCloud\Data\Resources\Win10_22H2_English_x64.iso" | Get-Volume
@ -33,5 +33,4 @@ $Source = $Drive.DriveLetter+":\"
#import OS #import OS
Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1" Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"
New-PSDrive -Name "DS001" -PSProvider MDTProvider -Root "T:\DeploymentShare" import-mdtoperatingsystem -path "DS001:\Operating Systems\Windows10auto" -SourcePath $Source -DestinationFolder "Windows 10 x64" -Verbose
import-mdtoperatingsystem -path "DS001:\Operating Systems\Windows10" -SourcePath $Source -DestinationFolder "Windows 10 x64" -Verbose