"Get-Command -CommandType cmdlet" on Windows PowerShell

Q

What is the "Get-Command -CommandType cmdlet" command doing in Windows PowerShell?

✍: FYIcenter.com

A

"Get-Command -CommandType cmdlet" will return a list of all cmdlets available on Windows PowerShell.

You can also filter the output by limiting to only cmdlets from the PowerShell modules:.

PS C:\fyicenter> Get-Command -CommandType cmdlet -Module *.PowerShell.*

Name                               ModuleName
----                               ----------
Add-Computer                       Microsoft.PowerShell.Management
Add-Content                        Microsoft.PowerShell.Management
Add-History                        Microsoft.PowerShell.Core
Add-Member                         Microsoft.PowerShell.Utility
Add-PSSnapin                       Microsoft.PowerShell.Core
Add-Type                           Microsoft.PowerShell.Utility
Checkpoint-Computer                Microsoft.PowerShell.Management
Clear-Content                      Microsoft.PowerShell.Management
Clear-EventLog                     Microsoft.PowerShell.Management
Clear-History                      Microsoft.PowerShell.Core
Clear-Item                         Microsoft.PowerShell.Management
Clear-ItemProperty                 Microsoft.PowerShell.Management
Clear-Variable                     Microsoft.PowerShell.Utility
Compare-Object                     Microsoft.PowerShell.Utility
Complete-Transaction               Microsoft.PowerShell.Management
Connect-PSSession                  Microsoft.PowerShell.Core
ConvertFrom-Csv                    Microsoft.PowerShell.Utility
ConvertFrom-Json                   Microsoft.PowerShell.Utility
ConvertFrom-SecureString           Microsoft.PowerShell.Security
ConvertFrom-StringData             Microsoft.PowerShell.Utility
Convert-Path                       Microsoft.PowerShell.Management
ConvertTo-Csv                      Microsoft.PowerShell.Utility
ConvertTo-Html                     Microsoft.PowerShell.Utility
ConvertTo-Json                     Microsoft.PowerShell.Utility
ConvertTo-SecureString             Microsoft.PowerShell.Security
ConvertTo-Xml                      Microsoft.PowerShell.Utility
Copy-Item                          Microsoft.PowerShell.Management
Copy-ItemProperty                  Microsoft.PowerShell.Management
...

 

Introduction of Windows PowerShell Cmdlet

⇒⇒Windows PowerShell Tutorials

2016-11-05, 329👍, 0💬