Commands / Files

Get-Location

Show the current folder

beginner Files Aliases glpwd

Get-Location
 Get-Location
Works on
WindowsLinuxmacOS
PowerShell
5.1 and later
Reference
Microsoft Learn: Get-Location

Shows the current folder. Every relative path (.\docs, ..\backup) is relative to this.

The prompt usually shows it too: PS C:\Path\To\Folder>. The automatic variable $PWD holds the same value.

Try this

Get-Location
Set-Location -Path ..
Get-Location

Jump somewhere and come back:

Push-Location -Path $env:TEMP
Get-ChildItem
Pop-Location

Coming from another shell

ShellWhat you might type
bash / zshpwd
cmd.execd

More in From bash and From cmd.

Related commands