Contact Info

Crumbtrail

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

Get-Command - Powershell 3.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
Get-Command [[-ArgumentList] <Object[]>] [-All] [-ListImported] [-Module <String[]>] [-Noun <String[]>] [-ParameterName
 <String[]>] [-ParameterType <PSTypeName[]>] [-Syntax] [-TotalCount <Int32>] [-Verb <String[]>] [<CommonParameters>]
Get-Command [[-Name] <String[]>] [[-ArgumentList] <Object[]>] [-All] [-CommandType <CommandTypes>] [-ListImported] [-Mo
dule <String[]>] [-ParameterName <String[]>] [-ParameterType <PSTypeName[]>] [-Syntax] [-TotalCount <Int32>] [<CommonPa
rameters>]





Description
The Get-Command cmdlet gets all commands that are installed on the computer, including cmdlets, aliases, functions, wor
kflows, 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 sess
ion, 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 th
e 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 m
odule that contains the command so you can use the command immediately. To enable, disable, and configure automatic imp
orting of modules, use the $PSModuleAutoLoadingPreference preference variable. For more information, see about_Preferen
ce_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 tha
t 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.