April 26th, 2015

PowerTip: Find Current Directory in PowerShell

Doctor Scripto
Scripter

Summary: Easily find the current directory in Windows PowerShell. 

Hey, Scripting Guy! Question How can I return a path object that contains information about the current working directory in Windows PowerShell?

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

PS C:\> $pwd

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.