Export (0) Print
Expand All
Expand Minimize

PSTokenType Enumeration

Defines the types of tokens that can be generated from Windows PowerShell scripts. This class is introduced in Windows PowerShell 2.0.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim instance As PSTokenType

public enum class PSTokenType
public enum PSTokenType
public enum PSTokenType

Member nameDescription
AttributeAn attribute, such as the attribute Mandatory in $param([Mandatory] $a. This field is introduced in Windows PowerShell 2.0.
CommandA command, such as a cmdlet or function name. This field is introduced in Windows PowerShell 2.0.
CommandArgumentAn argument, such as a parameter value, for a command. This field is introduced in Windows PowerShell 2.0.
CommandParameterA parameter of a cmdlet or function. This field is introduced in Windows PowerShell 2.0.
CommentA comment, such as #MyComment. This field is introduced in Windows PowerShell 2.0.
GroupEndThe closing symbol used to group code, such as a closing curly bracket. This field is introduced in Windows PowerShell 2.0.
GroupStartThe opening symbol used to group code, such as an opening curly bracket. This field is introduced in Windows PowerShell 2.0.
KeywordA language keyword, such as the if keyword. This field is introduced in Windows PowerShell 2.0.
LineContinuationA line continuation symbol, such as a backtick ("`"). This field is introduced in Windows PowerShell 2.0.
LoopLabelA loop label, such as :Loop. This field is introduced in Windows PowerShell 2.0.
MemberA property or method name, such as the property computer in $a.computer. This field is introduced in Windows PowerShell 2.0.
NewLineA new line symbol, such as "\n". This field is introduced in Windows PowerShell 2.0.
NumberA number, such as the number 12 in $a=12. This field is introduced in Windows PowerShell 2.0.
OperatorA operator, such as the operator "+" in $a=1+2. This field is introduced in Windows PowerShell 2.0.
PositionA token that is generated to only specify a position in the script. This field is introduced in Windows PowerShell 2.0.
StatementSeparatorA statement separator, such as the semicolon (";"). This field is introduced in Windows PowerShell 2.0.
StringA number, such as the string "12" in $a="12". This field is introduced in Windows PowerShell 2.0.
TypeA data type, such as the type string in $a=[string] 12. This field is introduced in Windows PowerShell 2.0.
UnknownAn unknown token type. This field is introduced in Windows PowerShell 2.0.
VariableA variable, such as the variable $a in $a="12". This field is introduced in Windows PowerShell 2.0.

Tokens are generated by parsing Windows PowerShell scripts using the Tokenize method.


 

Target Platforms

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft