Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 1.0 » Push-Location

Push-Location - Powershell 1.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Push-Location

Description
Push a location to the stack

Usage


Options


Example(s)
Push the current location onto the default stack and then change location to C:\Windows\ :

PS C:\>push-location C:\Windows

Push the current location onto the stack and then change to the home directory (%USERPROFILE%), which can be represented by the tilde symbol (~) or $home:

PS C:\>push-location ~

Push the current location onto the 'myregstack' stack and change location to HKLM:\Software\Policies:

PS HKLM:\software>push-location HKLM:\Software\Policies -stackname myRegstack