CmdID

CmdID / PowerShell / Cmdlets / Pop

Pop-Location

Changes the current location to the location most recently pushed onto the stack. PowerShell reference

From the PowerShell reference 3 parameters Alias popd

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Changes the current location to the location most recently pushed onto the stack. The Pop-Location cmdlet changes the current location to the location most recently pushed onto the stack by using the Push-Location cmdlet. You can pop a location from the default stack or from a stack that you create by using a Push-Location command.

Pop-Location [-PassThru] [-StackName <String>] [-UseTransaction] [<CommonParameters>]

Change to most recent location

PS C:> Pop-LocationIdentify

Change to most recent location in a named stack

PS C:> Pop-Location -StackName "Stack2"Identify

Move between locations for different providers

PS C:> pushd HKLM:\Software\Microsoft\PowerShell PS HKLM:\Software\Microsoft\PowerShell> pushd Cert:\LocalMachine\TrustedPublisher PS Cert:\LocalMachine\TrustedPublisher> popd PS HKLM:\Software\Microsoft\PowerShell> popd PS C:>Identify

Its page in the reference: Pop-Location.

Parameters

3 in the PowerShell reference
-PassThruPasses an object that represents the location to the pipeline. By default, this cmdlet does not generate any output.
-StackNameSpecifies the location stack from which the location is popped. Enter a location stack name. Without this parameter, Pop-Location pops a location from the current location stack. By default, the current location stack is the unnamed default location stack that PowerShell creates. To make a location stack the current location stack, use the StackName parameter of the Set-Location cmdlet. For more information about location stacks, see the Notes. Pop-Location cannot pop a location from the unnamed default stack unless it is the current location stack.
-UseTransactionIncludes the command in the active transaction. This parameter is valid only when a transaction is in progress. For more information, see about_Transactions.