Please feel free to provide feedback or file bugs here.

Exclude parameter doesn't work on Get-ChildItem (ls alias) at root drive folder

Votes from Connect: 3

Original Date Submitted: 10/30/2015 7:31:59 PM

Description:
********Contact Information********
Handle: Aurélien Lustrement
Site Name: PowerShell
Feedback ID: 1961824
***************************************

Frequency: PowerShell
Regression: Open PS and change directory to "C:\"
Enter command "ls -Exclude Users".
The command returns nothing

Problem Description:
Command "ls -Exclude Something" always returns nothing if executed at root drive folder. Perfectly works on any other subfolder.
Tested on Win7 (PS 2.0 & 5.0) and Win10.

Product Studio item created by Connect Synchronizer due to creation of feedback ID 1961824 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1961824).

Repro Steps:
Open PS and change directory to "C:\"
Enter command "ls -Exclude Users".
The command returns nothing

Expected Results:
All items on "C:\" except "Users" folder.

Internal BugId: 15937

3 votes
Sign in
(thinking…)
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

AdminJoey Aiello [MSFT] (Program Manager, Windows Server) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • Sebastian N. commented  ·   ·  Flag as inappropriate

    +1
    I'm able to reproduce this on Win10 Pro (version 10.0.10586)

    PS D:\> $PSVersionTable

    Name Value
    ---- -----
    PSVersion 5.0.10586.0
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.10586.0
    CLRVersion 4.0.30319.42000
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1

Feedback and Knowledge Base