PowerShell and the Exchange Management Shell provide several automatic variables. The following table provides a list of commonly-used automatic variables with a description for each one:
Variable Name |
Description |
$$ |
This contains the last token in the last command received. |
$? |
This contains the execution status of the last command. |
$^ |
This contains the first token in the last command received. |
$_ |
This contains the current object being processed within a pipeline. |
$Args |
This contains an array of undeclared arguments received by a function, script, or script block. |
$Error |
This contains an array of error objects recorded in the current shell session. The latest error ... |