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

Chapter 3 quick reference

To

Do this

Produce a listing of all variables defined in a Windows PowerShell session

Use the Set-Location cmdlet to change location to the Variable PS drive, and then use the Get-ChildItem cmdlet.

Obtain a listing of all the aliases

Use the Set-Location cmdlet to change location to the Alias PS drive, and then use the Get-ChildItem cmdlet to produce a listing of aliases. Pipeline the resulting object into the Where-Object cmdlet and filter on the name property for the appropriate value.

Delete a directory that is empty

Use the Remove-Item cmdlet and supply the name of the directory.

Delete a directory that contains other items

Use the Remove-Item cmdlet and supply the name of the directory and specify the -recurse ...

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