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

   

# NAME
Pop-Location

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

# SYNTAX
Pop-Location [-PassThru] [-StackName <string>] [-UseTransaction] [<CommonParameters>]

# DESCRIPTION
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.

# PARAMETERS
-PassThru [<SwitchParameter>]
Passes an object representing the location to the pipeline. By default, this cmdlet does not generate any output.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-StackName <string>
Specifies an alternate stack. Pop-Location pops the most recently added location from this stack. This stack then becomes the current stack.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-UseTransaction [<SwitchParameter>]
Includes the command in the active transaction. This parameter is valid only when a transaction is in progress. For more information, see about_Transactions.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

# INPUTS
None
You cannot pipe input to Pop-Location.

# OUTPUTS
None or System.Management.Automation.PathInfo
When you use the PassThru parameter, Pop-Location generates a System.Management.Automation.PathInfo object that represents the location. Otherwise, this cmdlet does not generate any output.

# NOTES

You can also refer to Pop-Location by its built-in alias, "popd". For more information, see about_Aliases.

The Pop-Location cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type "Get-PSProvider". For more information, see about_Providers.

# EXAMPLE 1

C:\PS>pop-location

# Description
-----------
This command changes your location to the location most recently added to the current stack.

# EXAMPLE 2

C:\PS>pop-location -stackname Stack2

# Description
-----------
This command changes your location to the location most recently added to the Stack2 stack.

# EXAMPLE 3

C:\PS>pushd HKLM:\Software\Microsoft\PowerShell

pushd Cert:\LocalMachine\TrustedPublisher

popd

popd

PS C:\> push-location HKLM:\Software\Microsoft\PowerShell

PS HKLM:\Software\Microsoft\PowerShell> push-location Cert:\LocalMachine\TrustedPublisher

PS cert:\LocalMachine\TrustedPublisher> popd

PS HKLM:\Software\Microsoft\PowerShell> popd

PS C:\ps-test>

# Description
-----------
These commands use the Push-Location and Pop-Location cmdlets to move between locations supported by different Windows PowerShell providers. The commands use the "pushd" alias for Push-Location and the "popd" alias for Pop-Location.

The first command pushes the current file system location onto the stack and moves to the HKLM drive supported by the Windows PowerShell Registry provider. The second command pushes the registry location onto the stack and moves to a location supported by the Windows PowerShell certificate provider.

The last two commands pop those locations off the stack. The first "popd" command returns to the Registry: drive, and the second command returns to the file system drive.

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113369
about_Providers
Push-Location
Set-Location
Get-Location

C:\Windows>powershell get-help New-PSDrive -full

ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2014 Microsoft Corporation.

OS: Windows 10, 8.1, 8, 7, Vista / Windows Server 2016, 2012, 2008
»»»» ColorConsole








Windows-10





Windows-10

... facebook.de
... Windows-10 FAQ
... Windows-10 Info


Become a Sponsor
... Your button here?





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

HTTP: ... PS_Windows/en/Pop-Location.htm
0.311
25211

See list of all installed fonts under Windows 10 (+ 4K problem)!

 /

Can I find out if i have windows 8.1 or 10 version, is it x32 or x64?

 /

Access to essential memory and system functions under Windows! 

 /

Fantastic Rain Drops for all Mouse Devices on MS Windows OS!

 /

Wenn der Monitor immer an und aus geht bei Windows 10!

 /

Wie kann ich die nicht wieder beschreibbaren CDs, oder DVDs sicher löschen?

 /

How do I quickly create user accounts via command line?

 /

I would like to add Q-Dir to windows system shell context menu!

 /

Windows 10/8.1: Can I turn off or remove the lock screen  (faster login)?

 /

Quick view and preview customize Windows 10 (fast access)!

 /

When drag drop are not all files and directorys added to the list?

 /

Wi-Fi Passwort vom WLAN Netzwerk (anzeigen,finden,hacken)?

 /