CopyAutopilotQuickIdealEnvironmentToDrive.ps1
param ( #Path to an Mounted ISO #This file will be mounted and the contents will be copied to the OSDCloud USB [Parameter(Mandatory)] [System.String]$DriveLetter, [Parameter(Mandatory)] [System.String]$PathToAutopilotQuickIdealEnvironment ) $osdbootStartTime = Get-Date Write-Host "Copying ideal environment to '$($DriveLetter):\'..." -Foreground Magenta robocopy "$($PathToAutopilotQuickIdealEnvironment.TrimEnd('\'))" ($DriveLetter+":\AutopilotQuick\") *.* /e /ndl /njh /njs /np /r:0 /w:0 /b /zb $osdbootEndTime = Get-Date $osdbootTimeSpan = New-TimeSpan -Start $osdbootStartTime -End $osdbootEndTime Write-Host -ForegroundColor Cyan "Completed copying ideal environment to drive in $($osdbootTimeSpan.ToString("mm' minutes 'ss' seconds'"))" |