Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Get-ChildItem

Get-ChildItem - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Get-ChildItem

Short description
Gets the files and folders in a file system drive.

Syntax


Description
The Get-ChildItem cmdlet gets the items in one or more specified locations. If the item is a container, it gets the ite
ms inside the container, known as child items. You can use the Recurse parameter to get items in all child containers.


A location can be a file system location, such as a directory, or a location exposed by a different Windows PowerShell 
provider, such as a registry hive or a certificate store.

In a file system drive, the Get-ChildItem cmdlet gets the directories, subdirectories, and files. In a file system dire
ctory, it gets subdirectories and files. 

By default, Get-ChildItem gets non-hidden items, but you can use the Directory, File, Hidden, ReadOnly, and System para
meters to get only items with these attributes. To create a complex attribute search, use the Attributes parameter. If 
you use these parameters, Get-ChildItem gets only the items that meet all search conditions, as though the parameters w
ere connected by an AND operator. 

Note: This custom cmdlet help file explains how the Get-ChildItem cmdlet works in a file system drive. For information 
about the Get-ChildItem cmdlet in all drives, type "Get-Help Get-ChildItem -Path $null" or see Get-ChildItem at http://
go.microsoft.com/fwlink/?LinkID=113308.