Understanding PowerShell Commands

PowerShell commands, also known as Cmdlets, are defined within PowerShell as classes that implement their functionality by using .NET code. They are really .NET classes compiled into Dynamic Link Libraries (DLLs) that are loaded by PSH. In this tutorial, you will learn how to access existing Cmdlets, how what their names mean and how to find help.

Setup

If you have not already done so, click open Windows PowerShell ISE. Remember, you must always run Windows PowerShell as the Administrator for best results and unlimited access.

Step one.

You can actually find all the Cmdlets that are at your disposal by running the following command:

Example

Get-Command
    

Copy and Try it

There are so many that it actually just scrolls on by and you will only see the last group will be presented at the end of the list to you. Not a problem, this is an easy fix. To see all the Cmdlets one line at a time, run the following command:

Example

Get-Command | more
    

Copy and Try it

The (|) pipe character is used in piping, which "pipes" the output to another command. This concept will be covered in a different tutorial.

Step two.

Getting help with Cmdlets is actually quite simple and at times very necessary. The Get-Help Cmdlet will actually be one of the most used Cmdlet you use in PSH. Say for example you want to get help with the cmdlet Get-Service, you will run the following commands:

Example

Get-Help Get-Service
    

Copy and Try it

You can also add a space after the commands above and type –detailed or –full and what these switches will do is provide more information for "detailed" or provide you with technical information in the "full" switch.

Remarks last but not least…

Another easy way to look up Cmdlets is to search through the internet for them, but for immediate results, Get-Help cmdlet will actually get you pretty far. Join us next time for additional tutorials on Windows PowerShell. Till then…