Powershell Errorhandling
In the old days I maintained a local folder on my disk with usefull codesnippets. No more! I’ll post them online. This one is to make your script bullit-proof.
Try
{
$a = 13 / 0
}
Catch
{
Echo $_.Exception.GetType().FullName
$_.Exception | Select-Object -Property * | fl -Force
}
Geef een reactie