Powershell Bad Code #6: The parameter ErrorVariable is not working

By | July 6, 2015

Question: Why the variable $errProcess is empty with the common parameter -ErrorVariable ?

Not working

errorvariable-not-working-powershell

Working

The content of the variable $errProcess should contain the error:

errorvariable-working-powershell

Answer :


previous-buttonnext-button

Leave a Reply

Your email address will not be published. Required fields are marked *