Work with the PowerShell location stack

If you navigate among directories a lot, the following will be useful. Here is an example workflow.

  1. Save your current directory with push-location
  2. Go to another directory with cd <path>
  3. Return the your initial directory with pop-location

Push-Location <path>

Get-Location -Stack

Pop-Location