Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ErrorHandlerScript = {
Param(
$Sender,
$Event
)
$Message.Add([PSCustomObject]@{
Number = $Event.Errors.Number
Line = $Event.Errors.LineNumber
Message = $Event.Errors.Message
}) | Out-Null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment