From fec0589cef1904f33275128767a2c0d61e3549f9 Mon Sep 17 00:00:00 2001 From: Upgrayedd Date: Sat, 17 Aug 2024 21:45:48 -0500 Subject: [PATCH] Update setupMDT.ps1 add scripts copied from the gui --- setupMDT.ps1 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/setupMDT.ps1 b/setupMDT.ps1 index 85f4dbd..afa949e 100644 --- a/setupMDT.ps1 +++ b/setupMDT.ps1 @@ -18,4 +18,20 @@ mkdir T:\DeploymentShare #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 -# \ No newline at end of file +# + +#add Operating System Folder +Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1" +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 + +#mount the windows ISO +Mount-DiskImage -ImagePath "\\SynCloud\Data\Resources\Win10_22H2_English_x64.iso" | Get-Volume +$info = Mount-DiskImage -ImagePath "\\SynCloud\Data\Resources\Win10_22H2_English_x64.iso" +$Drive = ($info | get-volume) $info +$Source = $Drive.DriveLetter+":\" + +#import OS +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\Windows10" -SourcePath $Source -DestinationFolder "Windows 10 x64" -Verbose \ No newline at end of file