PSTokenType Enumeration
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
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)
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
| Member name | Description |
|---|---|
| Attribute | An attribute, such as the attribute Mandatory in $param([Mandatory] $a. This field is introduced in Windows PowerShell 2.0. |
| Command | A command, such as a cmdlet or function name. This field is introduced in Windows PowerShell 2.0. |
| CommandArgument | An argument, such as a parameter value, for a command. This field is introduced in Windows PowerShell 2.0. |
| CommandParameter | A parameter of a cmdlet or function. This field is introduced in Windows PowerShell 2.0. |
| Comment | A comment, such as #MyComment in the following script. This field is introduced in Windows PowerShell 2.0. |
| GroupEnd | The closing symbol used to group code, such as the closing curly bracket the following script. This field is introduced in Windows PowerShell 2.0. |
| GroupStart | The opening symbol used to group code, such as the opening curly bracket in the following script. This field is introduced in Windows PowerShell 2.0. |
| Keyword | A language keyword, such as the keyword if in the following script. This field is introduced in Windows PowerShell 2.0. |
| LineContinuation | A line continuation symbol, such as ` in the following script. This field is introduced in Windows PowerShell 2.0. |
| LoopLabel | A loop label, such as :Loop in the following script. This field is introduced in Windows PowerShell 2.0. |
| Member | A property or method name, such as the property computer in $a.computer. This field is introduced in Windows PowerShell 2.0. |
| NewLine | A new line symbol, such as \n in the following script. This field is introduced in Windows PowerShell 2.0. |
| Number | A number, such as the number 12 in $a=12. This field is introduced in Windows PowerShell 2.0. |
| Operator | A operator, such as the operator + in $a=1+2. This field is introduced in Windows PowerShell 2.0. |
| Position | A token that is generated to only specify a position in the script. This field is introduced in Windows PowerShell 2.0. |
| StatementSeparator | A statement separator, such as the semicolon ; in the following script. This field is introduced in Windows PowerShell 2.0. |
| String | A number, such as the string "12" in $a="12". This field is introduced in Windows PowerShell 2.0. |
| Type | A data type, such as the type string in $a=[string] 12. This field is introduced in Windows PowerShell 2.0. |
| Unknown | The type for the token could not be determined. This field is introduced in Windows PowerShell 2.0. |
| Variable | A variable, such as the variable $a in $a="12". This field is introduced in Windows PowerShell 2.0. |
Target Platforms
Windows Developer Preview, Windows Server Developer PreviewSend comments about this topic to Microsoft.