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

Working with cmdlets: step-by-step exercises

In the following exercise, you’ll explore the use of the Get-ChildItem and Get-Member cmdlets in Windows PowerShell. You’ll see that it is easy to use these cmdlets to automate routine administrative tasks. You’ll also continue to experiment with the pipelining feature of Windows PowerShell.

Working with the Get-ChildItem and Get-Member cmdlets

  1. Open the Windows PowerShell console.

  2. Use the Get-Alias cmdlet to retrieve a listing of all the aliases defined on the computer. Pipe this output to a Where-Object cmdlet. Specify a -match argument against the definition property that matches the name of the Get-ChildItem cmdlet. The code is as follows:

    gal | Where definition -match "Get-ChildItem"

    The results ...

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