CommandTypes Enum

Definition

Defines the types of commands that PowerShell can execute.

This enumeration supports a bitwise combination of its member values.

public enum class CommandTypes
[System.Flags]
public enum CommandTypes
[<System.Flags>]
type CommandTypes = 
Public Enum CommandTypes
Inheritance
CommandTypes
Attributes

Fields

Alias 1

Aliases create a name that refers to other command types. Aliases are only persisted within the execution of a single engine.

All 511

All possible command types. NOTE: a CommandInfo instance will never specify All as its CommandType but All can be used when filtering the CommandTypes.

Application 32

Any existing application (can be console or GUI). An application can have any extension that can be executed either directly through CreateProcess or indirectly through ShellExecute.

Cmdlet 8

A cmdlet.

Configuration 256

A Configuration.

ExternalScript 16

An PowerShell script (*.ps1 file)

Filter 4

Script filters that are defined by a script block. Filters are only persisted within the execution of a single engine.

Function 2

Script functions that are defined by a script block. Functions are only persisted within the execution of a single engine.

Script 64

A script that is built into the runspace configuration.

Workflow 128

A workflow

Applies to