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 | Alias | |
2 | Function | |
4 | Filter | |
8 | 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 |