Pop-Location

Set the current working location from the stack. (popd)
The new location will either be the most recent entry from the stack (created with Push-Location) or the default stack.

Syntax
      Pop-Location [-stackName string] [-passThru] [CommonParameters]

Key
   -stackName string
       An alternate stack. This stack now becomes the current stack.

   -passThru 
       Pass the object created through the pipeline. 
       By default, Pop-Location does not pass any objects through the pipeline.
		
   CommonParameters:
       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable.

The push-location cmdlet (pushd) can be used to store file locations, certificate store locations or registry locations. Pop-Location (popd) can be used repeatedly to move back though all the locations on the stack.

Example

Change the current working location to the last one pushed onto the stack:

PS C:\>pop-location

#Get back, get back. Get back to where you once belonged. Get back loretta# - The Beatles

Related:

Push-Location - Push a location to the stack
Equivalent bash command: popd - Remove the top entry from the directory stack



Back to the Top

© Copyright SS64.com 1999-2010
Some rights reserved