Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Do you want to find a command in PowerShell but don’t know how to? This guide teaches you how to find other cmdlets with the PowerShell Get-Command cmdlet.

Overview

You use the Get-Command to return all commands installed on your computer. Furthermore, the Get-Command returns cmdlets, aliases, functions, filters, scripts, and applications.

Like all cmdlets in PowerShell, the Get-Command has parameters (more on this in section 3 of this guide). If you do not specify a parameter, Get-Command returns all of the cmdlets, functions, and aliases installed on the computer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Another important piece of information about this essential PowerShell command is that it does not get only PowerShell commands. Apart from returning PowerShell-related commands, the Get-Command also gets non-PowerShell files.

Specifically, Get-Comand returns files defined in the Path environment variable ($env:Path).

Syntaxes of the Get-Command Cmdlet

The Get-Command has two syntaxes. Here they are:

Get-Command
   [-Verb <String[]>]
   [-Noun <String[]>]
   [-Module <String[]>]
   [-FullyQualifiedModule <ModuleSpecification[]>]
   [-TotalCount <Int32>]
   [-Syntax]
   [-ShowCommandInfo]
   [[-ArgumentList] <Object[]>]
   [-All]
   [-ListImported]
   [-ParameterName <String[]>]
   [-ParameterType <PSTypeName[]>]
   [<CommonParameters>]
Get-Command
   [[-Name] <String[]>]
   [-Module <String[]>]
   [-FullyQualifiedModule <ModuleSpecification[]>]
   [-CommandType <CommandTypes>]
   [-TotalCount <Int32>]
   [-Syntax]
   [-ShowCommandInfo]
   [[-ArgumentList] <Object[]>]
   [-All]
   [-ListImported]
   [-ParameterName <String[]>]
   [-ParameterType <PSTypeName[]>]
   [-UseFuzzyMatching]
   [-UseAbbreviationExpansion]
   [<CommonParameters>]

The first syntax allows you to return a cmdlet based on the noun and/or verb of the cmdlet.

If you want to learn about the verb and now of PowerShell cmdlets, read my tutorial, Introduction To Cmdlets.

However, if you want to find a PowerShell cmdlet with its name, use the second syntax.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Parameters of the Get-Command Cmdlet

The table below lists and explains the parameters of Get-Command.

Get-Command Parameter NamePowerShell Get-Command Parameter Meaning/Notes
VerbUse the Verb parameter to specify the very of the command you want Get-Command to get. You can use wildcard characters with this parameter.
NounUse the Noun parameter to specify the very of the command you want Get-Command to get. You can use wildcard characters with this parameter.
NameWhen you use the Name parameter, you can specify the name of the cmdlet you want to return with Get-Command. You can use wildcard characters with the Name parameter like the Verb and Noun parameters.
ModuleUse the Module parameter of the PowerShell Get-Command to specify the name of the module you want Get-Command to get. You cannot use the Module and the FullyQualifiedModule parameters in the same command.
FullyQualifiedModule When you run the Get-Command command, you can specify a hashtable where you define the module name and version, for example. You can use the FullyQualifiedModule parameter to specify this hashtable. The Get-Command command will then return all commands that meet the requirements specified in the hashtable.
CommandType When you run the PowerShell Get-Command command, it automatically returns all cmdlets, functions, and aliases. If you want to return one command type, use the CommandType parameter to specify the command type you want to return. The CommandType parameter accepts the following values: Alias, Application, ExternalScript, Script, or Workflow.
TotalCount The Get-Command cmdlet can return a long list of commands installed on your computer. To specify how many commands to return, use the TotalCount parameter. Then, specify a numeric value.
SyntaxIf you specify the Syntax parameter of the PowerShell Get-Command command, Get-Command returns the following information:
*cmdlet, it returns the syntax of the cmdlet
*alias, it returns the standard name of the cmdlet with the alias
*functions and filters, it returns the function’s definition.
*scripts and applications or files, it returns the path and filename of the script of the application
ShowCommandInfoWhen you use the ShowCommandInfo parameter, Get-Command displays some information about the command. Specifically, Get-Command displays the name of the cmdlet, the name of the module, and the CommandType. Not only those, but Get-Command will also return the command’s parameters and syntax.
ArgumentListIf you want the PowerShell Get-Command to get information about a cmdlet or function when it is used with the specified parameters, you use the ArgumentList parameter. In this instance, you specify the parameters of the cmdlet you wish to return with the ArgumentList parameter of Get-Command.
AllWhen you specify the All parameter, the PowerShell Get-Command command returns information about all commands. Using the All parameter forces Get-Command to include commands of the same type that have the same name.
ListImportedIf you want to list only cmdlets in the current PowerShell session, specify the ListImported parameter.
ParameterNameWant to get cmdlets that have a specific parameter? Use the ParameterName parameter of Get-Command to specify the parameter.
ParameterTypeIf you want to list all cmdlets with a specific type of parameter, use the ParameterType parameter of the PowerShell Get-Command command to specify the parameter parameter. Some common parameter types are String, Switch, Int, DateTime.
*UseFuzzyMatchingThis switch parameter makes the Get-Command command matter. Sometimes, you’re not sure about the name of the cmdlet you need. When you specify the UseFuzzyMatching PowerShell Get-Command parameter and type some of the letters of the cmdlet you’re looking for, Get-Command returns cmdlets close to the letters you entered.
*UseAbbreviationExpansionWhen you specify this switch parameter, Get-Command matches characters in your command to find the uppercase equivalent cmdlet. For example, “Get-Command r-i -UseAbbreviationExpansion” would return Remove-Item and Rename-Item “r-i” match “R” (uppercase) and “I” (uppercase) in Remove-Item and Rename-Item.
This parameter is useful in finding cmdlets that you remember parts of its letters.
*These parameters are not available in PowerShell version 5. I am not sure what version Microsoft introduced this parameter. But I can confirm that they are available in PowerShell version 7.2.4.

Get-Command Examples

So far, you have learned about the syntax and parameters of the Get-Command Cmdlet. In this section, you will learn different examples and applications of this all-important cmdlet.

How to Find the Alias of PowerShell Get-Command

You can use the Get-Alias command to find the alias of any PowerShell cmdlet.

So, to find the alias of the PowerShell Get-Command, use the command below.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Get-Alias -Definition Get-Command

Here is the result of the command in PowerShell. According to the result of the above command, the alias of Get-Command is gcm.

How To Find The Alias Of PowerShell Get-Command

How to Use Get-Command and Get-Help to Learn About PowerShell Cmdlets

Two of the most important PowerShell cmdlets are the Get-Command and the Get-Help cmdlets. These two cmdlets are important because you use them to learn about other parameters.

For example, if I want to delete a file and I need to find the cmdlet to do this, the first step is to think of any word that will be in a cmdlet used to delete files.

The word “remove” comes to mind. With this in mind, I will use Get-Command to find the full cmdlet.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Here is the command that will do this job.

Get-Command *Remove*

Unfortunately, this returns a long list of cmdlets. However, I see a cmdlet called Remove-Item when I look through the list.

How To Find The Alias Of PowerShell Get-Command - How To Use Get-Command And Get-Help To Learn About PowerShell Cmdlets

Moving on, if I’m new to PowerShell and I am not sure if this is the correct cmdlet, I can then use the Get-Help command to check. Here is a basic command that will give me some information about the Remove-Item.

Get-Help Remove-Item

The result of the last command confirms that the Remove-Item “Deletes the specified items”. So, this is definitely the cmdlet I am looking for.

Although I know that I can use Remove-Item to delete files or folders. But, how do I use the command?

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Get-Help provides this information as well.

In the last screenshot, there is a section called “SYNTAX.” This section provides you tells you how to use the command, including how to use its parameters.

How To Find The Alias Of PowerShell Get-Command - How To Use Get-Command And Get-Help To Learn About PowerShell Cmdlets

Although the syntax section of Get-Help offers some useful information, it can be confusing for newbies. However, Get-Help has one more piece of information (out of so many it offers) that you will find helpful.

When you run the Get-Help with its Examples parameter, PowerShell displays examples of how to use the cmdlet you’re learning about.

For example, to display some examples of the usage of the Remove-Item cmdlet, run the command below.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Get-Help Remove-Item -Examples

How to Use Get-Command to Find Cmdlets by Verb or Noun

As you would have noted in this guide’s syntax and parameter sections, the Get-Command cmdlet has two parameters: Verb and Noun.

You can use these parameters to find cmdlets by their verb or noun. For example, to list all cmdlets with the verb “Get”, I’ll run the command below.

Get-Command -Verb Get

As you would expect, the last command returns a very long list.

However, you can reduce the list by specifying the Noun (or use a wildcard to specify some of the letters) of the cmdlet you need.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Here is an example that returns all cmdlets with the Verb “Get” and contains the letters “dns” in its Noun.

Get-Command -Verb Get -Noun *dns*

I can also reduce the number of cmdlets by removing the asterisk before “dns”. This way, PowerShell returns only cmdlets with Noun starting with “dns”.

Get-Command -Verb Get -Noun dns*

How to Use Get-Command to Get Information about Where-Object

To list the basic information about a cmdlet with PowerShell Get-Command, run Get-Command without any parameter. For example, to get the basic information about the Where-Object cmdlet, I will run the command below:

Get-Command Where-Object

The last command tells us that Where-Object is a cmdlet, and the current version of the cmdlet on my computer is 3.0.0.0. In addition to that information, the command also tells the module of Where-Object.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
How To Use Get-Command To Get Information About Where-Object

You will agree that the information provided by the last command is not very useful. For example, as it does not show me all possible syntaxes of the Where-Object command, I’ll run the command below:

Get-Command Where-Object -ShowCommandInfo
To learn more about the ShowCommandInfo parameter of the Get-Command command, see the parameters section of this guide.

The most important information displayed by the last command is all the possible syntaxes of the Where-Object command.

How To Use Get-Command To Get Information About Where-Object

How to Filter the Results of PowerShell Get-Command by Name or Source

So far, I have shown you how to use Get-Command to find cmdlets with different approaches. One of the examples I shared above uses the Verb and Noun parameters of Get-Command to filter cmdlets.

In addition to using the Verb and Noun parameters of Get-Command to filter cmdlets, you can also use the Where-Object command to filter cmdlets by name, source, and other properties.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In my first example, I’ll pipe Get-Command to Where-Object. Then, I will use the Where-Object to return the command with a specific name.

Specifically, the command below returns the Get-ChildItem command.

Get-Command | Where-Object -Property Name -EQ "Get-ChildItem"
How To Fileter The Results Of PowerShell Get-Command By Name Or Source

In another example, I’ll now show you how you can filter commands by source using the PowerShell Get-Command and Where-Object.

Here is an example…

Get-Command | Where-Object -Property Source -EQ "Dism"

The last command displays all cmdlets in the Dism module (source).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

1. How Do You Display Cmdlets In PowerShell?

To display all cmdlets in PowerShell, run the Get-Command command.

2. What Does The Command Get-Alias Do?

The Get-Alias command lists available aliases for PowerShell cmdlets on your computer.

3. How Do You Run A Cmdlet?

To run a cmdlet, open PowerShell; then, if you know the cmdlet’s syntax, enter the cmdlet followed by its parameters. Finally, press the Enter key on your keyboard to run the cmdlet.

Alternatively, if you know the cmdlet you want to run but do not know its syntax, run “Get-Help cmdlet_name” to get it. You can also run “Get-Help cmdlet_name -Examples” to see a list of examples of how to use the cmdlet.

4. What Is Get-Member In PowerShell?

The Get-Member cmdlet gets the properties and methods of objects in PowerShell.

If you want to learn the properties and methods of a PowerShell command, pipe the output of that command to the Get-Member cmdlet.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
5. How Do I Run PowerShell?

To run PowerShell, search “PowerShell” (without the quotes). Then, open “Windows PowerShell” from the search results.

Conclusion

The Get-Command cmdlet is arguably the most important cmdlet to learn. I say that because you can use it to find cmdlets you need to perform tasks with PowerShell.

In this guide, you read the overview of the PowerShell Get-Command. The guide also covered the syntax, parameters, and some examples of this all-important PowerShell cmdlet.

With the knowledge you gained from this article, I hope I have been able to set you on a good path to learning Windows PowerShell!

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Would you mind sparing 2 minutes to share your PowerShell journey using the comment form at the bottom of this page? Alternatively, you can respond to the “Was this page helpful?” question below.

Finally, to read more PowerShell articles, visit our Windows PowerShell Explained or Windows PowerShell How-To Guides pages.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.