vmware / PowerCLI-Example-Scripts

http://blogs.vmware.com/powercli
Other
754 stars 603 forks source link

New-HVManualApplication Crashes PowerShell Loops #394

Open wow-6432 opened 3 years ago

wow-6432 commented 3 years ago

If new-hvmanualapplication encounters an error, it will crash a PowerShell loop.

Ex:

$MultipleApps foreach ($app in $MutipleApps) { new-hvmanualapplication @params }

If $app[5] can't be created for whatever reason (already exists, farm name invalid, etc.), the cmdlet somehow crashes the loop and apps 6, 7, 8, etc. aren't even attempted.

This appears to be caused by the breaks in these and other functions. Ex: Line 12296 of VMWare.HV.Helper.psm1.