PSD
PSD copied to clipboard
Offline deployment from media check not working
Deployment routine is not aborted when trying to deploy from offline media
Cause is that $tsenv:DeploymentMethod
will not be set to MEDIA
becuase Get-Volume | ? {-not [String]::IsNullOrWhiteSpace($_.DriveLetter) } | ? {$_.DriveType -eq 'Fixed'} | ? {$_.DriveLetter -ne 'X'} | ? {Test-Path "$($_.DriveLetter):Deploy\Scripts\Media.tag"}
in PSDStart.ps1
(Line 331) is an empty object because the offline boot medium is not of DriveType 'Fixed'
but CD-Rom
. Furthermore a backslash is missing between $($_.DriveLetter):
and Deploy\Scripts\Media.tag
.
Changing the command pipeline to Get-Volume | ? {-not [String]::IsNullOrWhiteSpace($_.DriveLetter) } | ? {$_.DriveLetter -ne 'X'} | ? {Test-Path "$($_.DriveLetter):\Deploy\Scripts\Media.tag"}
fixed the issue for me.
Thank you for your feedback, we will test your script changes and decide if they make it to production.