# Test try{Read-SCVirtualMachine $vmName -EA Stop}catch{$errorMessage=$error[0].Exception.GetType().FullNamewrite-host $errorMessage} # Get error type Microsoft.VirtualManager.Utils.CarmineException # Retry catch…
$folder1='C:\Temp' $folder2='C:\Temp2' $username=$null $password=$null function compareFileCounts{ param($folder1,$folder2,$mountAsUser,$mountAsPassword) function mountPathAsDrive($path,$driveLetter,$mountAsUser,$mountAsPassword){ function convertPathToUnc($path,$computername=$env:computername,$credentials=$null){ $pathIsUnc=$path -match '^\\\\' $pathIsReachable=if($credentials){test-path…