How to clear $Error in PowerShell?

Viewed 73159

Is there a way to clear the $Error variable that tracks errors in a PowerShell session?

If so, how do you do it?

I have tried: $error.clear

In the PowerShell ISE on Windows 7 and the $Error array is still populated.

1 Answers
Related