Work with the PowerShell location stack
If you navigate among directories a lot, the following will be useful. Here is an example workflow.
- Save your current directory with
push-location
- Go to another directory with
cd <path>
- Return the your initial directory with
pop-location
Push-Location <path>
- add the current location to the location stack
- then, change the directory to <path>
Get-Location -Stack
- show the locations on the default location stack
Pop-Location
- remote the top location from the location stack
- then, change the directory to that location