Chapter 2 Quick Reference


Open table as spreadsheet

To

Do This

Produce a list of all the files in a folder

Use the Get-ChildItem cmdlet and supply a value for the folder

Produce a list of all the files in a folder and in the subfolders

Use the Get-ChildItem cmdlet, supply a value for the folder, and specify the recurse argument

Produce a wide output of the results of a previous cmdlet

Use the appropriate cmdlet and pipe the resulting object to the Format-Wide cmdlet

Produce a listing of all the methods available from the Get-ChildItem cmdlet

Use the cmdlet and pipe the results into the Get-Member cmdlet. Use the -membertype argument and supply the Noun method

Produce a popup box

Create an instance of the wshShell object by using the New-Object cmdlet. Use the Popup method

Retrieve the currently logged-on user name

Create an instance of the wshNetwork object by using the New-Object cmdlet. Query the username property

Retrieve a listing of all currently mapped drives

Create an instance of the wshNetwork object by using the New-Object cmdlet. Use the EnumNetworkDrives method




Microsoft Press - Microsoft Windows PowerShell Step by Step
MicrosoftВ® Windows PowerShell(TM) Step By Step (Step By Step (Microsoft))
ISBN: 0735623953
EAN: 2147483647
Year: 2007
Pages: 128
Authors: Ed Wilson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net