Automatic Variables Commands allow the definition of an automatic variable.
Instead of these commands being run directly, they will be embedded inline.
Automatic Variables are embedded in post processing by PostProcess.InitializeAutomaticVariable.
| VariableName | Description |
|---|---|
| CallstackPeek | $MyCaller (aka $CallStackPeek) contains the CallstackFrame that called this command. |
| IsPipedFrom | $IsPipedFrom determines if the pipeline continues after this command. |
| IsPipedTo | $IsPipedTo determines if a command is being piped to. |
| MyCaller | $MyCaller (aka $CallStackPeek) contains the CallstackFrame that called this command. |
| MyCallstack | $MyCallstack is an automatic variable that contains the current callstack. |
| MyCommandAst | $MyCommandAst contains the abstract syntax tree used to invoke this command. |
| MyParameters | $MyParameters contains a copy of $psBoundParameters. This leaves you more free to change it. |
| MySelf | $MySelf contains the currently executing ScriptBlock. A Command can & $myself to use anonymous recursion. |