Listing the available command types
The available command types can be extracted with the following simple PowerShell statements:
$enumValues = [System.Enum]::GetValues('System.Management.Automation.CommandTypes')
$enumValues.foreach( {
"$($_.value__)`t$($_.ToString())"
} )
| 1 | Windows/PowerShell/language/alias[Alias] | |
| 2 | Windows/PowerShell/language/function[Function] | |
| 4 | Filter | |
| 8 | Windows/PowerShell/language/cmdlet[Cmdlet] | |
| 16 | ExternalScript | |
| 32 | Application | |
| 64 | Script | |
| 128 | Workflow | Workflow is present in PowerShell 5.1 but not anymore in PowerShell 7.1 |
| 256 | Configuration | |
| 511, 383 | All | Value is 511 in PowerShell 5.1 and 383 in PowerShell 383 |