Any suggestions? Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Using the Get-Location Cmdlet

Checking Your Location in a Windows PowerShell Namespace

The Get-Location cmdlet simply lets you know where you are within the various Windows PowerShell drives. For example, this command:


Returns information similar to this:

C:\Documents and Settings\kenmyer

If you’d like to know the current location in a different drive, just use the -psdrive parameter following the call to Get-Location. For example, this command leaves you in your current location, but tells you where you would be if you used Set-Location to switch to the HKCU drive:

Get-Location -psdrive hkcu

Get-Location Aliases
  • gl

Related Links

© 2015 Microsoft