Executing the Get-Command cmdlet will provide a full listing of all the cmdlets available in PowerShell (as well as all the Aliases, Functions etc):
Executing Get-Help for a cmdlet will provide details on how to use the cmdlet, for example say if you wanted to see the usage for the Add-Computer cmdlet.
The Get-Help cmdlet can even provide examples of cmdlets working:
Each PowerShell cmdlet associates with an alias. You can use the alias instead of cmdlet full name. Execute Get-Alias for a full listing of all the Aliases in PowerShell (the Definition in the listing is the original Cmdlet name).
If you think cmdlet full name is a bit difficult, you can use short names (ie aliases) but note that this reduces the readability of the script. I prefer to use full names in scripts and aliases for ad-hoc queries.
PowerShell scripts are text files with the extension of “.ps1”. You can write PowerShell scripts by using cmdlets and save themfor future use. Commonly used tasks are good candidates for scripts. By default PowerShell prevents the execution of any script, due to the execution policy of the PowerShell. You can see the current execution policy in PowerShell using the Get-ExecutionPolicy cmdlet.
There are four levels of execution policies.
1. Restricted – Default setting of PowerShell. No scripts can run
2. AllSigned- Scripts should have the trusted digital signature
4. Unrestricted- Any script can run.
You can change the execution policy using the Set-ExecutionPolicy cmdlet. PowerShell needs to be “Run as Administrator” in order to set execution policy.