- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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