April 28th, 2015

PowerTip: Retrieve Last Token Received by PowerShell

Doctor Scripto
Scripter

Summary: Learn how to retrieve the last token that was received by Windows PowerShell.

Hey, Scripting Guy! Question How can I retrieve the last token received by Windows PowerShell?

Hey, Scripting Guy! Answer Use the $$ automatic variable:

PS C:\> notepad C:\fso\AMoreComplete.txt

PS C:\> $$

C:\fso\AMoreComplete.txt

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.