How to get the current directory of the cmdlet being executed May 20, 2023 by Tarik Yes, that should work. But if you need to see the absolute path, this is all you need: (Get-Item .).FullName