Remove-Item always generates system exception except when -ErrorAction SilentlyContinue - by baodad1

Status : 


Sign in
to vote
ID 794929 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 7/24/2013 3:17:34 PM
Access Restriction Public


When remove-item generates an error, there is no way to handle the error in Powershell without the error resulting in a system error that generates red error text on the console, EXCEPT if I add the -ErrorAction SilentlyContinue switch on to it, in which case it behaves like VB's On Error Resume Next, with no indication of failure whatsoever.
Sign in to post a comment.
Posted by baodad1 on 8/7/2013 at 6:53 PM
Is this by design?
I just found this page: