Displaying available command types
The Get-Command command does not list every command that is available in Windows PowerShell. Instead, the Get-Command command lists only the cmdlets in the current shell. Windows PowerShell actually supports several other types of commands. Aliases, functions, and scripts are also Windows PowerShell commands, although they are not discussed in detail in the Windows PowerShell Primer. External files that are executables, or have a registered file type handler, are also classified as commands.
You can return a listing of all items that can be invoked by entering the following command:
PS> Get-Command *
Because this list includes external files in your search path, it may contain thousands of items. It is more useful to look at a reduced set of commands. To find native commands of other types, you can use the CommandType parameter of the Get-Command cmdlet. Although we have not talked about these other command types yet, you can still display them if you know the name of the CommandType for a class of commands.
Note:
Although we have not discussed it yet, the asterisk (*) is used for wildcard matching in Windows PowerShell command arguments. The * means "match one or more of any characters". You can type Get-Command a* to find all commands that begin with the letter "a". Unlike wildcard matching in Cmd.exe, Windows PowerShell's wildcard will also match a period.
To display the special command category aliases (these are nicknames used as alternatives to standard command names), enter the following command:
PS> Get-Command -CommandType Alias
To display all Windows PowerShell functions, enter the following command:
PS> Get-Command -CommandType Function
To display external scripts in Windows PowerShell's search path, enter the following command:
PS> Get-Command -CommandType ExternalScript
Posted in: Software| Tags: Windows PowerShell Command Display Get external displaying primer detail aliases shell