Share via


PowerShell: Get-Command Examples

Search for all Cmdlets and Functions with the word "item" anywhere in the name.

Get-Command -CommandType Cmdlet, Function -Name *item*

Sample results 1:

Capability     Name                                         ModuleName                                      

----------      ----                                             ----------                                      

Cmdlet         Clear-Item                                  Microsoft.PowerShell.Management                 

Cmdlet         Clear-ItemProperty                    Microsoft.PowerShell.Management                 

Cmdlet         Copy-Item                                  Microsoft.PowerShell.Management                 

Search for all commands with 'Unknown' capability:

Get-Command -CommandCapability Unknown

Sample results 2:

Capability     Name                                          ModuleName                                      

----------      ----                                              ----------                                      

Unknown      cvxml ->                                     Pscx                                            

Unknown      fhex ->                                       Pscx                                            

Unknown      fxml ->                                       Pscx         

==========================================================================================================

Search for commands with the verb 'Get', and 'session' in the noun.

Get-Command -Verb get -Noun *session*

Sample results 3:

Capability       Name                                           ModuleName                                      

----------         ----                                              ----------                                      

Cmdlet           Get-CimSession                           CimCmdlets                               

Cmdlet           Get-PSSession                             Microsoft.PowerShell.Core                       

Cmdlet           Get-PSSessionConfiguration       Microsoft.PowerShell.Core  

Back to: Tip & Tricks (What's new in V3)

See Also