Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 4.0 » Get-Command

Get-Command - Powershell 4.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Get-Command

Short description
Gets all commands.

Syntax


Description
The Get-Command cmdlet gets all commands that are installed on the computer, including cmdlets, aliases, functions, 
workflows, filters, scripts, and applications. Get-Command gets the commands from Windows PowerShell modules and 
snap-ins and commands that were imported from other sessions. To get only commands that have been imported into the 
current session, use the ListImported parameter.


Without parameters, a "Get-Command" command gets all of the cmdlets, functions, workflows and aliases installed on the 
computer. A "Get-Command *" command gets all types of commands, including all of the non-Windows-PowerShell files in 
the Path environment variable ($env:path), which it lists in the "Application" command type.


A Get-Command command that uses the exact name of the command (without wildcard characters) automatically imports the 
module that contains the command so you can use the command immediately. To enable, disable, and configure automatic 
importing of modules, use the $PSModuleAutoLoadingPreference preference variable. For more information, see 
about_Preference_Variables (http://go.microsoft.com/fwlink/?LinkID=113248).


Get-Command gets its data directly from the command code, unlike Get-Help, which gets its information from help topics.


In Windows PowerShell 2.0, Get-Command gets only commands in current session. It does not get commands from modules 
that are installed, but not imported. To limit Get-Command in Windows PowerShell 3.0 and later to commands in the 
current session, use the ListImported parameter.