PowerShell Automatic Variables
Windows PowerShell Automatic Variables | |
|---|---|
Variables automatically used and set by Windows PowerShell | |
Variable | Meaning |
| Last token of the last line received by the shell. |
| Success/fail status of the last operation. |
| First token of the last line received by the shell. |
| Current pipeline object in a pipelined script block. |
| Array of parameters passed to the script, function, or scriptblock. |
| Preference that controls the level of
impact that operations may have before requesting confirmation.
Supports the values |
| Filename of the PowerShell console file that configured this session. |
| Currently executing command, when in a suspended prompt. |
| Preference that controls how
PowerShell should handle debug output written by a script or
cmdlet. Supports the values |
| Array that holds the (terminating and non-terminating) errors generated in the shell. |
| Preference that controls how PowerShell should handle error output written by a script or cmdlet. |
Supports the values | |
| Preference that controls how
PowerShell should output errors in the shell. Supports the
values of |
| Means by which scripts can access the APIs typically used ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access