Tuesday, April 12, 2016

PowerShell try/catch

try
{
   asdfljkasdxfkljsdhjklgnslgn!
}
catch
{
   echo "Something went South! Specifically:"
   echo $_.Exception.Message
}
finally
{
   echo "Whatever."
}

No comments:

Post a Comment