VeeamHub/powershell

$mountdrive is an empty string

Closed this issue · 3 comments

Upgrade-Veeam.ps1

I wasn't able to get this script to run with a local .iso. It very quickly errored out. Also, it wouldn't dismount the .iso despite mounting it without issue. I was able to pinpoint at least one issue- the $mountDrive variable was empty. Adding a -passthru to your $mount variable allowed the rest of the mount logic to go through. I'm running the script as I type this and so far so good. I can't say adding '-passthru' is the only solution, but it worked for me.

Mounting ISO

try {
Write-Log "Mounting ISO in Operating System"
$mount = Mount-DiskImage -ImagePath $iso -StorageType ISO
$mountDrive = (Get-DiskImage -ImagePath $iso | Get-Volume).DriveLetter + ":"
}

I was recently informed this might be an issue with Server 2016. I tested the script using Server 2019. I'll look further into it and follow-up.