PS#2: Three Core Cmdlets – Part 2: “Get-Command”


Unfinished.

Proverbs 28:2 (NIV)

“When a country is rebellious, it has many rulers, but a ruler with discernment and knowledge maintains order.”


Purpose:

This three-part post aims to showcase the three core cmdlets in PowerShell & relies on this Microsoft documentation as it’s main source.

Part #2 of 3 will focus on using the “Get-Command”.

Part #1 of this 3-part post focused on the “Get-Help” cmdlet.


“Get-Command”

“Get-Command” helps you find commands.

Entering the “Get-Command” into PowerShell without any parameters should return all of the commands on your system.


SYNTAX for “Get-Command”

(1) You could use the “Get-Help” cmdlt to display the help article.

(2) Use the “Get-Command” cmdlet with the “-Syntax” parameter.

As follows:

Get-Command -Name Get-Command -Syntax

The “-Name Get-Command” portion of the whole command allows you to NAME your specific command, so it can be replaced.

For Instance: If we wanted to look up the SYNTAX for “Get-AzureAutomationAccount” it would be typed in like this

Get-Command -Name Get-AzureAutomationAccount -Syntax

This would output as:

Method (2) will help avoid the additional content which will be given in Method (1).


All PowerShell posts here.

PowerShell#1 blog-post here: Installing PowerShell on Windows.

Proverbs 28:2 (NIV)

“When a country is rebellious, it has many rulers, but a ruler with discernment and knowledge maintains order.”



Comments

One response to “PS#2: Three Core Cmdlets – Part 2: “Get-Command””

  1. […] The next article in this three-part PowerShell series will focus on the “Get-Command” cmdlet. […]

Leave a Reply

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