Replicating Linux’s “cd -” in PowerShell

As I continue to use PowerShell as my everyday shell, I miss a few shortcuts from Linux, most of all “cd -“, which allowed me to go back to my previous directory. So I set out to replicate this functionality in PowerShell (or at least see if someone else had done so already). Turns out