PowerShell Pointers

Robert Sheldon

June 27, 2007

1 Min Read
ITPro Today logo in a gray background | ITPro Today

PowerShell has many built-in Cmdlets that provide information about the language itself. When you're learning PowerShell, you'll likely find the following Cmdlets helpful:

Aliases. PowerShell supports aliases that you can use to reference Cmdlets. For example, you can use Foreach or % to reference the Foreach-Object Cmdlet. For a list of aliases, enter

Get-Alias 

at the PowerShell command prompt. For general information about aliases, enter

Get-Help About_Alias 

Cmdlets. For a list of Cmdlets, enter

get-help -category Cmdlet 

To retrieve detailed information about a Cmdlet, including the parameters it supports, enter

get-help CmdletName -detailed 

where CmdletName is the name of the Cmdlet you want to get information about. For example, to retrieve information about the Get-Service Cmdlet, enter

get-help get-service -detailed 

ForEach-Object Cmdlet versus ForEach statement. the Foreach-Object Cmdlet and Foreach statement aren't the same. to learn how they differ, enter

Get-Help About_ForEach 

Help. to retrieve information about how to use PowerShell help, enter

Get-help get-help 

Operators. to learn about operators (e.g., -replace, -gt, -ne), enter

Get-Help About_Operator 

PowerShell security. to learn about PowerShell security, enter

Get-Help Set-ExecutionPolicy 

WMI classes. For information about how to access WMI classes, enter

Get-Help Get-WMIObject
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like