776
Part V: Enterprise Data Management
Running MSSQL$INST01 SQL Server (INST01)
Running MSSQL$INST02 SQL Server (INST02)
In this example, PowerShell sifts through the current services on the system and returns
only those services currently running. The braces ({}) delimit the operation of the
where-object cmdlet. These braces allow embedded operations within loop-type struc-
tures; and together with the script content between them, are referred to as a script block.
Most important, help is always available using the Get-Help cmdlet. It can also be called using the help or man
aliases. Either way, help can be obtained for any cmdlet; it returns the syntax, description, and related links.
Get-Help has options to return normal, full, detailed, or examples.
To get help on any cmdlet, type Get-Help followed by the cmdlet. To get help on Get-
Help, type the following:
PS> Get-Help Get-Help
NAME
Get-Help
SYNOPSIS
Displays information about Windows PowerShell cmdlets and concepts.
SYNTAX
Get-Help [[-name] <string>] [-component <string[]>]
[-functionality <string[]>] [-role <string[]>] [-category <stri
ng[]>] [-full] [<CommonParameters>]
Get-Help [[-name] <string>] [-component <string[]>]
[-functionality <string[]>] [-role <string[]>] [-category <stri
ng[]>] [-detailed] [<CommonParameters>]
Get-Help [[-name] <string>] [-component <string[]>]
[-functionality <string[]>] [-role <string[]>] [-category <stri
ng[]>] [-examples] [<CommonParameters>]
Get-Help [[-name] <string>] [-component <string[]>]
[-functionality <string[]>] [-role <string[]>] [-category <stri
ng[]>] [-parameter <string>] [<CommonParameters>]
DETAILED DESCRIPTION
The Get-Help cmdlet displays information about Windows PowerShell
cmdlets and concepts. You can also use "Help {<cm
dlet name> | <topic-name>" or "<cmdlet-name> /?".
"Help" displays the help topics one page at a time. The "/?" disp
c30.indd 776c30.indd 776 7/31/2012 9:46:21 AM7/31/2012 9:46:21 AM
http://www.it-ebooks.info