September 29th, 2012

PowerTip: Find the Last Command PowerShell Ran

Doctor Scripto
Scripter

Summary: Find the last Windows PowerShell command by using an automatic variable.

Hey, Scripting Guy! Question How can you find the last Windows PowerShell command that was run?

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

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.

Feedback