Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

Also when you leave out the specific exception type on the Catch block ?

Try{

    Get-VM $serverVMName |

    New-Snapshot -Name "dppfr-$serverVMName-$TimeStr" -Description "Automated backup" -ErrorAction stop

}

Catch{

    sendError

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos