O'Reilly logo

Windows PowerShell™ 3.0 Step by Step by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Get-ChildItem cmdlet

In Chapter 1, you used the dir command to obtain a listing of all the files and folders in a directory. This works because there is an alias built into Windows PowerShell that assigns the Get-ChildItem cmdlet to the letter combination dir.

Obtaining a directory listing

In a Windows PowerShell console, enter the Get-ChildItem cmdlet followed by the directory to list. (Remember that you can use tab completion to compete the command. Type get-ch and press Tab to complete the command name.) Here is the command:

Get-ChildItem C:\

Note

Windows PowerShell is not case sensitive, therefore get-Childitem, Get-childitem, and Get-ChildItem all work the same way, because Windows PowerShell views all three as the same command. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required