Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

System.Management.Automation.Language Namespace

The System.Management.Automation.Language namespace contains classes, interfaces, and enumerations that allow the customization of actions that occur when processing different types of Windows PowerShell language entities.

ClassDescription
ArrayExpressionAstThe ast that represents an array expression, e.g. @(1). The array literal (e.g. 1,2,3) is represented by ArrayLiteralAst. Introduced in Windows PowerShell 3.0.
ArrayLiteralAstThe ast that represents an array literal expression, e.g. 1,2,3. An array expression, e.g. @(dir), is represented by ArrayExpressionAst. An array literal expression can be constructed from a single element, as happens with the unary comma operator, e.g. ,4. Introduced in Windows PowerShell 3.0.
ArrayTypeNameRepresents the name of an array type, including the dimensions. Introduced in Windows PowerShell 3.0.
AssignmentStatementAstThe ast that represents an assignment statement, e.g. $x = 42. Introduced in Windows PowerShell 3.0.
AstRepresents the abstract base class for all PowerShell abstract syntax tree nodes. Introduced in Windows PowerShell 3.0.
AstVisitorRepresents functionality to be invoked on nodes of different types when an abstract syntax tree is traversed by the PowerShell engine. Introduced in Windows PowerShell 3.0.
AstVisitor2This element is introduced in Windows PowerShell 5.0.
AttributeAstThe ast representing an attribute with optional positional and named arguments. Introduced in Windows PowerShell 3.0.
AttributeBaseAstAn abstract base class representing attributes that accept optional arguments, e.g. [Parameter()], as well as type constraints, such as [int]. Introduced in Windows PowerShell 3.0.
AttributedExpressionAstThe ast that represents an expression with an attribute. This is normally allowed only on parameters or variables being assigned, e.g. [Parameter()]$PassThru or [ValidateScript({$true})$abc = 42. Introduced in Windows PowerShell 3.0.
BinaryExpressionAstThe ast representing a binary expression, e.g. $a + $b. Introduced in Windows PowerShell 3.0.
BlockStatementAstRepresents an abstract syntax tree of a script block with a keyword name. Introduced in Windows PowerShell 3.0.
BreakStatementAstThe ast representing the break statement. Introduced in Windows PowerShell 3.0.
CatchClauseAstThe ast that represents a single catch as part of a try statement. Introduced in Windows PowerShell 3.0.
CodeGenerationThis element is introduced in Windows PowerShell 5.0.
CommandAstRepresents the abstract syntax tree for a command invocation (for example, dir *.ps1). Introduced in Windows PowerShell 3.0.
CommandBaseAstAn abstract base class for a command and an expression wrapper that allows an expression as a command in a pipeline.
CommandElementAstAn abstract base class for the components of a CommandAst. Introduced in Windows PowerShell 3.0.
CommandExpressionAstThe ast representing an expression when the expression is used as the first command of a pipeline. Introduced in Windows PowerShell 3.0.
CommandParameterAstThe ast that represents a parameter to a command, e.g. dir -Path a*, this class represent '-Path', and in dir -Path:a*, this class represents '-Path:a*'.In the first case, the argument 'a*' is not represented by this class because the parser can't know until runtime if the argument is positional or if -Path accepts an argument. In the latter case, the argument 'a*' always belongs to the parameter -Path. Introduced in Windows PowerShell 3.0.
CommentHelpInfoContains the help content specified in help comments for a given script or script function. Introduced in Windows PowerShell 3.0.
ConfigurationDefinitionAstThis element is introduced in Windows PowerShell 5.0.
ConstantExpressionAstThe ast representing constant values, such as numbers. Constant values mean truly constant, as in, the value is always the same. Expandable strings with variable references, for example "$val", or sub-expressions, for example "$(1)", are not considered constant. Introduced in Windows PowerShell 3.0.
ContinueStatementAstThe ast representing the continue statement. Introduced in Windows PowerShell 3.0.
ConvertExpressionAstThe ast that represents a cast expression, for example [wmiclass]"Win32_Process". Introduced in Windows PowerShell 3.0.
DataStatementAstThe ast representing the data statement. Introduced in Windows PowerShell 3.0.
DefaultCustomAstVisitorThis element is introduced in Windows PowerShell 5.0.
DefaultCustomAstVisitor2This element is introduced in Windows PowerShell 5.0.
DoUntilStatementAstThe ast that represents a do/until statement. Introduced in Windows PowerShell 3.0.
DoWhileStatementAstThe ast that represents the do/while statement. Introduced in Windows PowerShell 3.0.
DynamicKeywordTBD. Introduced in Windows PowerShell 4.0.
DynamicKeywordParameterTBD. Introduced in Windows PowerShell 4.0.
DynamicKeywordPropertyTBD. Introduced in Windows PowerShell 4.0.
DynamicKeywordStatementAstThis element is introduced in Windows PowerShell 5.0.
ErrorExpressionAstA placeholder expression used when there are syntactic errors in the source script. Introduced in Windows PowerShell 3.0.
ErrorStatementAstRepresents a placeholder statement that is used when there are syntactic errors in the source script.Introduced in Windows PowerShell 3.0.
ExitStatementAstThe ast representing the exit statement. Introduced in Windows PowerShell 3.0.
ExpandableStringExpressionAstThe ast that repesents a double quoted string and can have nested variable references or sub-expressions, for example "Name: $name`nAge: $([DateTime]::Now.Year - $dob.Year)". Introduced in Windows PowerShell 3.0.
ExpressionAstAn abstract base class that represents all PowerShell expressions. Introduced in Windows PowerShell 3.0.
FileRedirectionAstThe ast representing a redirection to a file, for example dir > out.txt, the '> out.txt' is represented by this ast. Introduced in Windows PowerShell 3.0.
FileRedirectionTokenA file redirection. Introduced in Windows PowerShell 3.0.
ForEachStatementAstThe ast representing the foreach statement. Introduced in Windows PowerShell 3.0.
ForStatementAstThe ast for a for statement. Introduced in Windows PowerShell 3.0.
FunctionDefinitionAstThe ast that represents a function or filter definition. The function is always named. Introduced in Windows PowerShell 3.0.
FunctionMemberAstTBDThis element is introduced in Windows PowerShell 5.0.
GenericTypeNameRepresents a closed generic type, including its arguments. Introduced in Windows PowerShell 3.0.
HashtableAstThe ast that represents a hash literal, for example @{a = 1}. Introduced in Windows PowerShell 3.0.
IfStatementAstThe ast that represents an if statement. Introduced in Windows PowerShell 3.0.
IndexExpressionAstThe ast that represents an index expression, for example $a[0]. Introduced in Windows PowerShell 3.0.
InputRedirectionTokenThe (currently unimplemented) input redirection. Introduced in Windows PowerShell 3.0.
InvokeMemberExpressionAstThe ast that represents the invocation of a method, for example $sb.Append('abc') or [math]::Sign($i). Introduced in Windows PowerShell 3.0.
LabeledStatementAstAn abstract base class for statements that have labels such as a while statement or a switch statement. Introduced in Windows PowerShell 3.0.
LabelTokenRepresents a label token, which begins with a colon (":") and is followed by the label name. Introduced in Windows PowerShell 3.0.
LoopStatementAstAn abstract base class for looping statements including the do/while statement, the do/until statement, the foreach statement, the for statement, and the while statement. Introduced in Windows PowerShell 3.0.
MemberAstThis element is introduced in Windows PowerShell 5.0.
MemberExpressionAstThe ast that represents accessing a member as a property, for example $x.Length or [int]::MaxValue.Most often this is a simple property access, but methods can also be access in this manner, returning an object that supports invoking that member. Introduced in Windows PowerShell 3.0.
MergingRedirectionAstThe ast representing a redirection that merges 2 streams, for example dir 2>&1Introduced in Windows PowerShell 3.0.
MergingRedirectionTokenA merging redirection. Introduced in Windows PowerShell 3.0.
NamedAttributeArgumentAstThe ast representing a named attribute argument. For example, in [Parameter(Mandatory=$true)], this ast represents Mandatory=$true. Introduced in Windows PowerShell 3.0.
NamedBlockAstThe ast representing a begin, process, end, or dynamic parameter block in a scriptblock. This ast is used even when the block is unnamed, in which case the block is either an end block (for functions) or process block (for filters). Introduced in Windows PowerShell 3.0.
NullStringRepresents a type that can be used to pass null into a .NET method that has a string parameter. Introduced in Windows PowerShell 3.0.
NumberTokenA constant number token. The value may be any numeric type including int, long, double, or decimal. Introduced in Windows PowerShell 3.0.
ParamBlockAstThe ast representing the parameter statement in a script block. Introduced in Windows PowerShell 3.0.
ParameterAstThe ast representing a parameter to a script. Parameters may appear in one of 2 places, either just after the name of the function, for example function foo($a){} or in a param statement, for example param($a). Introduced in Windows PowerShell 3.0.
ParameterBindingResultTBD. Introduced in Windows PowerShell 4.0.
ParameterTokenA parameter to a cmdlet (always starts with a dash, like -Path). Introduced in Windows PowerShell 3.0.
ParenExpressionAstThe ast that represents an expression, or pipeline, that is enclosed in parentheses, for example (1) or (dir)Introduced in Windows PowerShell 3.0.
ParseErrorRepresents a parsing error. Introduced in Windows PowerShell 3.0.
ParserThe parser that parses PowerShell script and returns a ScriptBlockAst, tokens, and error messages if the script cannot be parsed successfullly. Introduced in Windows PowerShell 3.0.
PipelineAstThe ast that repesents a PowerShell pipeline, for example gci -re . *.cs | select-string Foo or 65..90 | % { [char]$_ }.A pipeline must have at least 1 command. The first command may be an expression or a command invocation. Introduced in Windows PowerShell 3.0.
PipelineBaseAstAn abstract base class for statements that include command invocations, pipelines, expressions, and assignements. Any statement that does not begin with a keyword is derives from PipelineBastAst. Introduced in Windows PowerShell 3.0.
PropertyMemberAstTBDThis element is introduced in Windows PowerShell 5.0.
RedirectionAstAn abstract base class representing both file redirections and merging redirections. Introduced in Windows PowerShell 3.0.
RedirectionTokenAn abstract base class for merging and file redirections. Introduced in Windows PowerShell 3.0.
ReflectionTypeNameContains functionality that allows a Type to be used directly in the PowerShell abstract syntax tree.
ReturnStatementAstThe ast representing the return statement. Introduced in Windows PowerShell 3.0.
ScriptBlockAstRepresents the root node of an abstract syntax tree for a complete script. Introduced in Windows PowerShell 3.0.
ScriptBlockExpressionAstRepresents the abstract syntax tree for an anonymous script block expression, such as { dir }. Introduced in Windows PowerShell 3.0.
ScriptExtentRepresents a script extent used to customize the display of error location information. Introduced in Windows PowerShell 3.0.
ScriptPositionRepresents a single point in a script. Introduced in Windows PowerShell 3.0.
ScriptRequirementsRepresents the requirements of a script. Introduced in Windows PowerShell 3.0.
StatementAstAn abstract base class for any statement like an if statement or a while statement. Introduced in Windows PowerShell 3.0.
StatementBlockAstThe ast representing a block of statements. The block of statements could be part of a script block or some other statement such as an if statement or a while statement. Introduced in Windows PowerShell 3.0.
StaticBindingErrorTBD. Introduced in Windows PowerShell 4.0.
StaticBindingResultTBD. Introduced in Windows PowerShell 4.0.
StaticParameterBinderTBD. Introduced in Windows PowerShell 4.0.
StringConstantExpressionAstThe ast that represents a constant string expression that is always constant. This includes both single and double quoted strings, but the double quoted strings will not be scanned for variable references and sub-expressions.If expansion of the string is required, use ExpandableStringExpressionAst. Introduced in Windows PowerShell 3.0.
StringExpandableTokenA double quoted string, or a double quoted here string. Introduced in Windows PowerShell 3.0.
StringLiteralTokenA single quoted string, or a single quoted here string. Introduced in Windows PowerShell 3.0.
StringTokenThe base class for any string token, including single quoted string, double quoted strings, and here strings. Introduced in Windows PowerShell 3.0.
SubExpressionAstRepresents the abstract syntax tree of a subexpression, such as $(1). Introduced in Windows PowerShell 3.0.
SwitchStatementAstThe ast that represents a switch statement. Introduced in Windows PowerShell 3.0.
ThrowStatementAstThe ast representing the throw statement. Introduced in Windows PowerShell 3.0.
TokenRepresents many of the various PowerShell tokens, and is the base class for all PowerShell tokens. Introduced in Windows PowerShell 3.0.
TokenTraitsSpecifies a utility class to get statically known traits and invariant traits about PowerShell tokens. Introduced in Windows PowerShell 3.0.
TrapStatementAstThe ast that represents the trap statement. Introduced in Windows PowerShell 3.0.
TryStatementAstThe ast that represents a try statement. Introduced in Windows PowerShell 3.0.
TypeConstraintAstRepresents the abstract syntax tree of a type constraint, which is simply a type name with no arguments. Introduced in Windows PowerShell 3.0.
TypeDefinitionAstTBDThis element is introduced in Windows PowerShell 5.0.
TypeExpressionAstThe ast that represents a type literal expression, such as [int]. Introduced in Windows PowerShell 3.0.
TypeNameRepresents a simple type that is not an array or does not have generic arguments. Introduced in Windows PowerShell 3.0.
UnaryExpressionAstThe ast representing an expression with a unary operator. Introduced in Windows PowerShell 3.0.
UsingExpressionAstRepresents the abstract syntax tree of a using expression, such as $using:pshome. Introduced in Windows PowerShell 3.0.
UsingStatementAstTBDThis element is introduced in Windows PowerShell 5.0.
VariableExpressionAstRepresents the abstract syntax tree of a variable reference. Introduced in Windows PowerShell 3.0.
VariableTokenA variable token that is either a regular variable, such as $_, or a splatted variable like @PSBoundParameters. Introduced in Windows PowerShell 3.0.
WhileStatementAstThe ast for a while statement. Introduced in Windows PowerShell 3.0.

InterfaceDescription
IAstPostVisitHandlerThis element is introduced in Windows PowerShell 5.0.
ICustomAstVisitorRepresents functionality to be invoked on nodes of different types when an abstract syntax tree is traversed, and controls the order in which the tree is traversed. Introduced in Windows PowerShell 3.0.
ICustomAstVisitor2This element is introduced in Windows PowerShell 5.0.
IScriptExtentRepresents a span of text in a script. Introduced in Windows PowerShell 3.0.
IScriptPositionRepresents a single point in a script. Introduced in Windows PowerShell 3.0.
ITypeNameRepresents the name and the attributes of a type. Introduced in Windows PowerShell 3.0.

EnumerationDescription
AstVisitActionEach Visit* method in `Malformed returns one of these values to control how visiting nodes in the AST should proceed. Introduced in Windows PowerShell 3.0.
ConfigurationTypeThis element is introduced in Windows PowerShell 5.0.
DynamicKeywordBodyModeTBD. Introduced in Windows PowerShell 4.0.
DynamicKeywordNameModeTBD. Introduced in Windows PowerShell 4.0.
ForEachFlagsFlags that are specified on a foreach statement. Values may be or'ed together, not all invalid combinations of flags are detected. Introduced in Windows PowerShell 3.0.
MethodAttributesTBDThis element is introduced in Windows PowerShell 5.0.
PropertyAttributesTBDThis element is introduced in Windows PowerShell 5.0.
RedirectionStreamThe stream number that is redirected. Introduced in Windows PowerShell 3.0.
StringConstantTypeThe kind of string constant. Introduced in Windows PowerShell 3.0.
SwitchFlagsThe flags that are specified on a switch statement. Values may be or'ed together, not all invalid combinations of flags are detected. Introduced in Windows PowerShell 3.0.
TokenFlagsFlags that specify additional information about a given token. Introduced in Windows PowerShell 3.0.
TokenKindThe specific kind of token. Introduced in Windows PowerShell 3.0.
TypeAttributesTBDThis element is introduced in Windows PowerShell 5.0.
UsingStatementKindTBDThis element is introduced in Windows PowerShell 5.0.


Show:
© 2015 Microsoft