Contact Info

Crumbtrail

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

Get-ChildItem - Powershell 1.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

Description
Get child items (contents of a folder or registry key)

Usage


Options


Example(s)
Get the child items in the current location:

PS C:\>get-childitem

List all the .XLS files in C:\Work and all sub-folders:

PS C:\>get-childitem C:\Work\ -Include *.xls -Recurse

List all the files owned by BillG:

PS C:\>get-childitem C:\Work\ -recurse | get-acl | where {$_.Owner -match "BillG"}

Measure the size of a folder:

Get-ChildItem C:\Work\ -Recurse -Force | Measure-Object -property length -sum

Get all the certificates in the certificate store that have a code-signing authority:

PS C:\>get-childitem cert:\. -recurse -codesigningcert

You can also run gci against a file share on a remote machine using a UNC path.