PowerShell Get-Command: Syntax, Applications, Examples

-

|

The PowerShell Get-Command cmdlet (‘command let’) in my opinion is the first PowerShell command you should know – that is if you are new to PowerShell.

What is PowerShell Get-Command?

PowerShell Get-Command lists all available PowerShell Cmdlets, Functions and Modules in your computer. I guess you are already beginning to see how helpful PowerShell Get-Command can be.

This is why I said that the Get-Command is a Cmdlet you need to know. The reason is simple. If you need a Cmdlet but you don’t know the Cmdlet or you cannot remember it, PowerShell Get-Command will help you find it.

How to Use PowerShell Get-Command to Find Cmdlets

Lets say you are scripting and you want to export some output to a csv file. The great thing about PowerShell Cmdlets is that they are like normal English words in the format Verb-Noun. With this in mind you know that the Cmdlets to export to txt file or csv will begin with the word “Export” – the verb part of the Cmdlet you need. This is the power of the Get-Command in PowerShell!

To find Cmdlets that begin with the word “Export”, run the command below:

Get-Command -Verb "export"

Here is the result of the command

Sponsored Content



PowerShell Parameters (Introduction)

Before I talk about the result of the command, let me digress a bit to tell you about PowerShell Parameters. Most, if not all PowerShell Cmdlets have one or two parameters (arguments).

You would have noticed that in the last command, I entered a hyphen “-” followed by the word “Verb” before I entered “Export”. The word “Verb” is a parameter of the Get-Command Cmdlet. A Cmdlet parameter allows you to filter the results produced by the Cmdlet. Adding “-Verb” parameter allowed me to inform Get-Command that I want only Cmdlets with Verb “Export”.

With that said, lets go back to the Get-Command in PowerShell.

Going back to the results of the last command, notice that “Export-Csv” appears in the list – I highlighted this in the image to make it easy to spot. We have used the Get-Command in PowerShell to find the Cmdlet we require! Isn’t that great!

Exploring More Ways to Use the PowerShell Get-Command Cmdlet

Another way you can use the PowerShell Get-Command Cmdlet is to use the parameter “-ParameterName” to find all Cmdlets that has a particular parameter. Wondering where this might be applicable? Lets see.

Say you are scripting and you want to find all Cmdlets that have a particular parameter, say “NoTyPeInformation“, you can run the command below to get all Cmdlets with this parameter.

Get-Command -ParameterName "NoTyPeInformation"

Here is the result of the command:

Get-Command -ParameterName "NoTyPeInformation"

That is the result of all Cmdlets currently available on my computer.

Sponsored Content


Conclusion

I hope you now know how to use the PowerShell Get-Command Cmdlet. If you have any questions or comments use the “Leave a Reply” form at the end of this guide. Alternatively, you could share your experience with other readers.

Other Helpful Guides

Additional Resources and References

  1. Parameters
  2. Powershell NoTypeInformation: Applications and Examples
  3. PowerShell ForEach loop: Applications with examples

LEAVE A REPLY

Please enter your comment!
Please enter your name here

FEATURED POSTS

network discovery keeps turning off server 2016

How to Fix Network Discovery If it Keeps Turning Off in Server 2016

Does network discovery keep turning off in your Windows server 2016? It is likely that one of its dependent services is not...
how to install windows 10 1903 update manually

How to Install Windows 10 1903 Update Manually

Windows 10 1903 Update was released in May, 2019. But some users are not yet offered the update via automatic update. The...
spotify web player not working

Spotify Web Player Not Working [Fixed]

Introduction Spotify Web Player may stop working for you with the following error messages: "Spotify Web Player an Error...
DISM.exe /Online /Cleanup-Image /Restorehealth

DISM.exe /Online /Cleanup-Image /Restorehealth Explained

What is DISM.EXE /Online /Cleanup-image /RestoreHealth? "DISM.exe /Online /Cleanup-Image /Restorehealth" is a DISM command that repairs issue with the...
DHCP Relay agent

DHCP Relay Agent: Configuration in Windows Server 2016

What is a DHCP Relay Agent? A DHCP Relay Agent allows DHCP clients in a different network subnet to...

TRENDING POSTS

Remote Desktop Connection

Remote Desktop Connection an Internal Error Has Occurred [Fixed]

Introduction I recently received the error message "Remote Desktop Connection an Internal Error Has Occurred". It was strange because...

Find My Samsung: Register and Use Samsung Find my Mobile

Introduction Ever wondered how you could find your Samsung phone if you lost it? Find my Samsung or Samsung...
What is the Difference Between PowerShell and CMD?

Windows Powershell vs CMD: Differences and Similarities

Introduction This short guide compares Windows PowerShell vs CMD (Windows command prompt). I will cover the history and nature...
Spotify No Longer Supports this Version of Microsoft Edge

Spotify No Longer Supports this Version of Microsoft Edge [Fixed]

Introduction When you open Spotify web player on Microsoft Edge, you may receive the error message "Spotify No Longer...
Windows 10 Won't Boot

Windows 10 Won’t Boot With Black Screen? 3 Ways to Fix It

Why Won't Windows 10 Boot Up? If your Windows 10 stops with a black screen, the first question in...

BEST OF ITECHGUIDES

foreach in file powershell

How to Iterate the Content of a Text File in Powershell in 2 Easy...

Introduction If you have a text file with data you wish to use, you can use PowerShell Get-Content ...
windows deployment services

Windows Deployment Services (WDS): Installation & Configuration

What is Windows Deployment Services Server? Windows Deployment Services (WDS) is a server role that provides a simplified and...
iPad Won't Charge

iPad Won’t Charge? How to Fix It

Why Won't iPad Charge? If your iPad won't charge it could be for a number of reasons. Here are...
iPhone SE vs iPhone 6s compared - which to buy

iPhone SE vs iPhone 6s Compared: Which to Buy

Introduction Considering whether to buy iPhone SE vs iPhone 6s? Not sure which is better? When I am trying...
Dual Boot Windows 7 and 10

Dual Boot Windows 7 and 10: Step by Step Guide

Introduction Want to try Windows 10 without upgrading? One option is to dual boot windows 7 and 10. ...

RECENT POSTS

disable cortana windows 10 featured

How to Disable Cortana in Windows 10 (2 Methods)

Introduction Some Windows 10 users may not like Cortana. Solution? Disable Cortana. You are probably reading this because you...
bootrec /fixboot access is denied

How to Fix BootRec /FixBoot Access is Denied Error in Windows 10

Introduction BootRec /FixBoot Access is Denied Error in Windows 10? This error is likely caused by corrupt EFI directory.
Reset Windows 10

How to Reset Windows 10 (2 Methods)

Introduction If your Windows 10 is broken, one available way to fix it is to use Windows 10 reset....
system restore windows 10

How to Enable and Use System Restore in Windows 10

Introduction System restore in windows 10 is a very important tool that is probably ignored by most users. But...
windows has stopped this device code 43

How to Fix Windows Has Stopped this Device Code 43 Error

Introduction Sometimes you may receive "Windows has stopped this device code 43" error. This error is likely to come...
Windows could not automatically detect this network's proxy settings

How to Fix “Windows Could not Automatically Detect this Network’s Proxy Settings”

Introduction You suddenly lose the ability to connect to the internet. Then you run network troubleshooter and it returns...
printer offline

5 Ways to Restore Your Printer Online If Status is Offline

Introduction Is your printer offline? Setting it online is very simple but sometimes it is more than just setting...

How to Fix “BootMgr is Missing” Error in Windows 10

Introduction If you receive Fix "BootMgr is missing" Error in Windows 10, the default response is panic! But you...
windows 10 search featured

How to Fix Windows 10 Search If it Stops Working

Introduction Are you having troubles with Windows 10 search? Apparently, it is a fairly common problem with a number...
oooops, something went wrong. reload

How to Fix “Oooops something went wrong. reload” Spotify Error

Introduction If you receive "Oooops something went wrong. reload" Spotify error, do not panic. The fix is simpler than...

MUST READ

windows was unable to complete the format

Windows was Unable to Complete the Format [Fixed]

Introduction When you try to format a USB stick or SD memory card you may receive the message "Windows...
active Directory currently not available

The Active Directory Domain Services is Currently Unavailable [Fixed]

Introduction The error message "The Active Directory Domain Services is Currently Unavailable" could be received in any of the...
Schedule-a-PowerShell-Script

How to Schedule a PowerShell Script to Auto Run On a Windows Server

Introduction If you want your PowerShell script to auto run at specific intervals you need to schedule the PowerShell...
Powershell_Arrays

PowerShell Array and Add to Array: Applications and Examples

What is a PowerShell Array? A PowerShell array is a data structure that stores a collection of items. The...
vlookup google sheets

How to Use VLOOKUP in Google Sheets

Introduction VLOOKUP (Vertical lookup) in google sheets is used to search for a value in the first column of...

By using this website you agree to accept our Privacy Policy and Terms & Conditions