Get-ChildItem

Description

Gets the items and child items in one or more specified locations.

Command
Get-ChildItem
Examples
List items in the current directory
Get-ChildItem
Recursively list all items in a directory
Get-ChildItem -Path C:\Users\ -Recurse
List only files in the current directory, including hidden files
Get-ChildItem -File -Force
Parameters
Parameter Type Required Description
[-Path <String[]>] string No Specifies a path to one or more locations.
[-Recurse] string No Gets the items in the specified locations and in all child items of the locations.
[-Force] string No Allows the cmdlet to get items that cannot otherwise be accessed, such as hidden or system files.
[-File] string No Gets files only.
[-Directory] string No Gets directories only.
Command Info
Category: File System
Type: Powershell
Views: 12
Status: Active
Tags
powershell files directories ls dir gci