Contact Info

Crumbtrail

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

Push-Location - Powershell 3.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

Short description
Adds the current location to the top of a location stack.

Syntax


Description
The Push-Location cmdlet adds ("pushes") the current location onto a location stack.  If you specify a path, Push-Locat
ion pushes the current location onto a location stack and then changes the current location to the location specified b
y the path. You can use the Pop-Location cmdlet to get locations from the location stack.


By default, the Push-Location cmdlet pushes the current location onto the current location stack, but you can use the S
tackName parameter to specify an alternate location stack. If the stack does not exist, Push-Location creates it.


For more information about location stacks, see the Notes.