Skip to content

Include parameter trailing asterisk with -Path #5126

@Hrxn

Description

@Hrxn

See Example number four on the Get-ChildItem documentation page.

When the Include parameter is used, the Path parameter needs a trailing asterisk (*) wildcard to specify the directory's contents. For example, -Path C:\Test\*.

Is this information still correct?
Because it seems to work if I only specify "E:\Test\", for example, without the trailing asterisk.
Seems to work, don't know why. Maybe this is a bit outdated?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions