Advertisements

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

Advertisements




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.


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

LATEST DEALS

Exclusive Student Offer_Save 10% on selected Surface devices

FEATURED POSTS

How to Change Administrator Name in Windows 10 (4 Methods)

How to Change Administrator Name in Windows 10

Introduction This guide demos how to change administrator name in Windows 10. There could be...
How to Setup WhatsApp Auto Reply in an Android Phone

How to Setup WhatsApp Auto Reply in an Android Phone

Introduction This guide demos how to setup Whatsapp auto reply in an Android phone. Steps...
How to Set Out of Office Auto Reply in Outlook, Outlook.com and Gmail

How to Set Out of Office Auto Reply in Outlook, Outlook.com and Gmail

Introduction This guide demos how to set out of office auto reply in Outlook, Outlook.com and Gmail.
How to Take Ownership of Folder in Windows 10

How to Take Ownership of Folder in Windows 10 (2 Methods)

Introduction This guide demos 2 methods to take ownership of folder in Windows 10. Options to...
How to Install Windows Server 2019 from USB

How to Install Windows Server 2019 from USB

Introduction This guide demos how to install Windows Server 2019 from USB. Steps to Install...

ADVERTISEMENTS

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

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...
how to login to spotify without facebook

How to Login to Spotify Without Facebook

This guide shows you how to login to spotify without Facebook if you are creating a new Spotify account or if you...
Configure Map Network Drive with Group Policy

Map Network Drive in Windows 10 with Group Policy

Introduction This guide demos how to map network drive with group policy. This guide is...
How to Fix Black Screen in Windows 10

How to Fix Black Screen in Windows 10 (4 Methods)

Introduction This guide offers 4 options to fix black screen in Windows 10 after login. A number of users...
How-to-Calculate-Standard-Deviation-in-Excel

How to Calculate Standard Deviation in Excel

Introduction Standard Deviation is a measure of how dispersed values are from their mean (average). You can calculate standard...

RECENT POSTS

C:\G-Drive\Work Tools\Products Portal\1. New Business\2. Content Sites\1. iTechGuides.com\Posts\1. HOW TO\Microsoft\MS Office\Microsoft Word\how to add more rows to a table in word

How to Add More Rows to a Table in Word and Google Docs

Introduction This guide demos how to add more rows to a table in Word. It also has a...
How to Create a Bar Chart in Excel and Google Sheets

How to Create a Bar Chart in Excel and Google Sheets

Introduction This guide demos how to create a bar chart in Excel and Google Sheets. A bar chart is...
How to Change Administrator Name in Windows 10 (4 Methods)

How to Change Administrator Name in Windows 10

Introduction This guide demos how to change administrator name in Windows 10. There could be...
How to Create a Pie Chart in Excel and Google Sheets

How to Create a Pie Chart in Excel and Google Sheets

Introduction This guide demos how to create a pie chart in Excel and Google Sheets. A pie chart is...

iTechGuides’ Top 10 Online Games

The gaming world is getting bigger day by day. Many people are getting engaged to play online games worldwide.

How to Open Local Security Policy in Windows 10 (5 Methods)

Introduction This guide demos how to open local security policy in Windows 10. Options to...

How to Change Network from Public to Private in Windows 10

Introduction This guide demos 2 methods to change network from public to private in Windows 10.
How to Disable Touchpad in Windows 10 for Dell or HP Laptop

How to Disable Touchpad in Windows 10 for Dell or HP Laptop

Introduction This guide demos how to Disable Touchpad in Windows 10 for a Dell or HP laptop.

How to Change Account Picture in Windows 10 (2 Methods)

Introduction This guide demos 2 methods to change account picture in Windows 10. Windows 10...
How to Create Xbox Live Account

How to Create Xbox Live Account (2 Methods)

Introduction This guide demos 2 methods to create Xbox Live account. Options to Create Xbox...

ADVERTISEMENTS

MUST READ

How to Change Network from Public to Private in Windows 10

Introduction This guide demos 2 methods to change network from public to private in Windows 10.
How to Set Out of Office Auto Reply in Outlook, Outlook.com and Gmail

How to Set Out of Office Auto Reply in Outlook, Outlook.com and Gmail

Introduction This guide demos how to set out of office auto reply in Outlook, Outlook.com and Gmail.
powershell add ad computers to array

How to Add AD Computers to a Powershell Array

Introduction There is one way to add AD Computers to a PowerShell array. A PowerShell array is a data...
repair windows server 2016

2 Easy Options to Repair Windows Server 2016

Introduction This guide offers 2 quick ways to repair Windows server 2016. The method you use will depend on...
How to Setup Gmail Auto Reply (Not Out of Office Auto Reply)

How to Setup Gmail Auto Reply (Not Out of Office Auto Reply)

Introduction This guide demos how to configure Gmail auto reply messages. The guide is not about setting up out...

LATEST DEALS

Exclusive Student Offer_Save 10% on selected Surface devices

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