I am writing a PowerShell script including many PowerCLI commands.
I need to test the success of each PowerCLI command (powering up and down VMs, creating and removing snapshots, and so on).
Is there a general way to test the exit of PowerCLI commands and, in case of failure, to get in a variable a syntetic description of the error?
Regards
marius