Powershell : The HELP System


Most important thing in mastering powershell is to understand how windows Powershell Help system works.
According to me its the best tool provided by the powerhsell creators for understanding and reference purposes.

Once you get an idea how it works your learning process will become little smooth and at least you will avoid unnecessary Google searches.You can use the following cmdlet to get help in Powershell-

Get-Help

SYNTAX :

Get-Help <Command Name>
Or,  Get-Help <Help_Topic>

The Get-Help cmdlet displays information about Windows PowerShell concepts and commands, including cmdlets, functions, CIM commands, workflows, providers, aliases and scripts.

To get help for a Windows PowerShell command, type “Get-Help” followed by the command name,
Example – Get-Help Get-Process.

h

To get a list of all help topics on your system, type: Get-Help *.

You can display the entire help topic or use the parameters of the Get-Help cmdlet to get selected parts of the topic, such as the syntax, parameters, or examples.

Get-Help Get-Process -Examples

Conceptual help topics in Windows PowerShell begin with “about_“, such as “about_Comparison_Operators“. To see all “about_” topics, type: Get-Help about_*.

h

To see a particular topic, type: Get-Help about_<topic-name>, such as Get-Help about_Comparison_Operators.
In addition to “Get-Help”, you can also type “help” or “man“, which displays one screen of text at a time,
Or “<cmdlet-name> -?“, which is identical to Get-Help but works only for commands.

Get-Help gets the help content that it displays from help files on your computer.

Without the help files, Get-Help displays only basic information about commands. Some Windows PowerShell modules come with help files. However, beginning in Windows PowerShell 3.0, the modules that come with Windows do not include help files. To download or update the help files for a module in Windows PowerShell 3.0, use the Update-Help cmdlet.

Or, you can also search Help files online over the internet,
Using the -online switch in Get-Help cmdlet.

Get-Help Get-Process -Online

Happy Learning !

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s