PowerCLI-Example-Scripts icon indicating copy to clipboard operation
PowerCLI-Example-Scripts copied to clipboard

New-HVManualApplication Crashes PowerShell Loops

Open wow-6432 opened this issue 5 years ago • 0 comments

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.

wow-6432 avatar Oct 20 '20 19:10 wow-6432