Remove-Item -Exclude parameter behavior is different/broken in PowerShell 4.0 compared to PowerShell 3.0 - by Jon Miller2

Status : 


Sign in
to vote
ID 811836 Comments
Status Active Workarounds
Type Bug Repros 1
Opened 12/17/2013 2:52:29 PM
Access Restriction Public


The set of PowerShell commands in the following example deletes the file d.txt when using PowerShell 4.0, but, not in PowerShell 3.0. The PowerShell 3.0 behavior seems correct.

md a
cd a
md b
md c
sc b/d.txt ''
ri .\* -Recurse -Exclude b -WhatIf
Sign in to post a comment.