The first thing you have to do is update the help system. You can update the help system using the following command.
update-help
The above command will update all the help files associated with powershell.
Help update-help -full
If you want to see the results in a separate window, where you can search for a particular string, use the following command.
help update-help -ShowWindow
Discovering Commands:
As you start learning , you wouldnt be aware of most of the commands. So lets say , you want to know the command which shows you all the details about ipadress. Powershell has a great way to discover command using help. Poweshell supports wildcard search. The following command will search for the commands which has the ipaddress string attached to it.
help *ipaddress*
The above command will list out all the commands which includes ipaddress. From that you can get the command which shows you all the ipaddress details. In this case it is Get-NetIpAddress
help Get-Service
The syntax section in the help will show you how to use the command. In the help section of Get-Service command , syntax looks like the following image.
-Name is a positioned parameter in Get-Service command, which mean if you pass a value with Get-Service method with or without the -Name Parameter, it will give the same output. Its because , powershell automatically adds the positioned parameter to the value. Int this case -Name parameter is positioned first. For example, the following two commands will give the same output.
Get-Service -Name winrm
Get-Service winrm
$host.Privatedata.ErrorForeGroundColor = 'green'
$host.Privatedata.ErrorBackGroundColor = 'black'