Master PowerShell This Summer: Essential Tips for Using Get-Command Like a Pro

Back in 2018, I wrote a series of blog posts focused on the fundamental PowerShell commands that every user should know.
These are the essential cmdlets that you truly can’t live without when working in PowerShell.

Now, I have revamped and updated this article series, and I will begin by diving into the powerful and versatile Get-Command.

When you run Get-Command without any parameters, it returns all commands loaded in your PowerShell session. In my case, this lists a total of 1,791 commands.

Often, you don’t need to distinguish whether a command is an Alias, Function, Cmdlet, or Script—especially if your goal is simply to retrieve information or perform a task.

If you want to display only Cmdlets, you can use the -CommandType parameter with the value Cmdlet to filter the results accordingly.

Get-Command -CommandType Cmdlet

Using this approach, I get 651 commands listed.

While this may not be the most precise method to find a specific command, it effectively narrows down the list.

Another way to get an smaller list is to use the parameter -Verb and then with Get or Set or another Verb.

Get-Command -Verb Get

With this approach, we will only list commands that provide us with information.

If we want more information about a specific cmdlet we can jus write:

Get-Command Get-TimeZone

If we want to know if there is other cmdlets for TimeZone usage we can use the parameter -Noun.

Get-Command -Noun TimeZone

And if we know that we want to use some cmdlets that are a part of a module then we can do this:

Get-Command -Module International

To display all cmdlets that perform Set operations within the International module, simply use the following command:

Get-Command -Verb Set -Module International

This was a short summer blog post and I will be posting more basic PowerShell commands all summer long.

Next up is Get-Help, to go from listing commands to get help using them.


Leave a Reply

Your email address will not be published. Required fields are marked *

The PowerAdmin
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.