Chapter 6 Quick Reference


Open table as spreadsheet

To

Do This

Simplify connecting into WMI while using default security permissions

Use the Get-WmiObject cmdlet

To control security when making a remote connection

Specify the impersonation levels in your script

To allow a script to use the credentials of the person launching the script

Use the “impersonate” impersonation level

To allow a script to load a driver

Use the loadDriver privilege

To control security when making a remote connection

Specify the impersonation levels in your script

Get rid of system properties when printing out all properties of a WMI class

Use the Format-List cmdlet and specify the property argument must be in range of [a–z]*

Get the current date and time

Use the Get-Date cmdlet

Subtract two dates

Use the New-TimeSpan cmdlet. Supply two date objects as arguments

Retrieve a listing of all commands typed during a Windows PowerShell session

Use the Get-History cmdlet

Run a command from the Windows PowerShell session history

Use the Invoke-History cmdlet

Retrieve the minimum and maximum values from an object

Use the Measure-Object cmdlet while specifying the property argument as well as the minimum and maximum arguments

Produce paged output from a long scrolling command

Pipeline the resulting object from the command into the more function




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