-TotalCount flag can be used with all the parameter combinations
To list all the cmdlets, functions and aliases available in the current session and imported from the remote sessions as well.
Get-CommandTo list applications and external scripts along with the cmdlets, functions and aliases.
Get-Command *To list all the commands from current session only
Get-Command -ListImportedTo limit the output count
Get-Command -TotalCount 10To list all the commands in the module Microsoft.PowerShell.Core
Get-Command -Module Microsoft.PowerShell.CoreTo list all the commands of a specific type (CmdLet/Function/Alias/ExternalScript/Application)
Get-Command -CommandType CmdLetTo list all the applications (executable files) available the paths of PATH environment variable
Get-Command -CommandType ApplicationGets the command by its name
Get-Command -Name Get-ComputerInfoGets the commands by name matching with the given wildcard pattern
Get-Command -Name *ipaddress*To list the commands with a specific verb
Get-Command -Verb InvokeTo list the commands with a specific noun
Get-Command -Noun ComputerTo list the command with a specific verb and noun combination
Get-Command -Verb Get -Noun HostTo list the commands with a specific verb matching with the wildcard
# Gets both Get and Set commands
Get-Command -Verb *etTo list the commands with a specific noun matching with the wildcard
Get-Command -Noun *InfoTo list the command with a specific verb and noun combination using the wildcard pattern
Get-Command -Verb *et -Noun HostGet-Command dirGet the commands by either the parameter name or parameter type, or both.
Get-Command -ParameterName VMName
Get-Command -ParameterType System.Boolean
Get-Command -ParameterName Scoped -ParameterType System.BooleanYou can use this switch if you are not sure about exact name of the command, and you can’t use this with wildcard search, and works only with -Name parameter combination
Get-Command -Name gotcemmand -UseFuzzyMatchingTo test this, create an empty Write-Error function and then run the command below
To create an empty function: Function Write-Error {}
Get-Command -Name Write-Error -All
# or
Get-Command -Name notepad -AllTo list the commands from the specific version of the module
Get-Command -FullyQualifiedModule @{ModuleName = "UEV"; ModuleVersion = "2.1.639.0" }Gets the commands count
Get-Command | Measure-Object -Line | Select-Object -ExpandProperty Lines
Get-Command -ListImported | Measure-Object -Line | Select-Object -ExpandProperty LinesList all the commands which return output and its output type
Get-Command | Where-Object OutputType | Format-ListTo refer the syntax of a command
Get-Command -Name Get-Counter -SyntaxTo list all the information related to the given command
Get-Command -Name New-NetIPAddress | Format-List *Gets the list of parameters
Get-Command -Name Get-ControlPanelItem | Select-Object -ExpandProperty Parameters
# Or
(Get-Command -Name Get-ControlPanelItem).ParametersGets the module/source name of a given command
Get-Command -Name Show-ControlPanelItem | Select-Object -ExpandProperty ModuleName
# Or
(Get-Command -Name Show-ControlPanelItem).ModuleNameGets the function code
Get-Command -Name Get-NetAdapterStatistics | Select-Object -ExpandProperty Definition
# Or
(Get-Command -Name Get-NetAdapterStatistics).DefinitionGets the command output type
Get-Command -Name Get-NetAdapterHardwareInfo | Select-Object -ExpandProperty OutputType
# Or
(Get-Command -Name Get-NetAdapterHardwareInfo).OutputTypeTo know the default parameterset
Get-Command -Name Get-Disk | Select-Object -ExpandProperty DefaultParameterSet
# Or
(Get-Command -Name Get-Disk).DefaultParameterSetTo know the type of a given command
Get-Command -Name Get-NetRoute | Select-Object -ExpandProperty CommandType
# Or
(Get-Command -Name Get-NetRoute).CommandTypeList all the dynamic parameters of a given command
Get-Command -Name Get-Package -ArgumentList 'Cert:' | `
Select-Object -ExpandProperty ParameterSets | `
ForEach-Object {$_.Parameters} | `
Where-Object {$_.IsDynamic} | `
Select-Object -Property Name -Unique