PowerShell 7 breaks the built-in 'cd -' command for returning to the previous directory. The fix involves adding a custom function to your PowerShell profile that restores this functionality. The article also covers related upgrade issues with PSReadLine and oh-my-posh, and provides a smarter approach to setting default

4m read timeFrom ardalis.com
Post cover image
Table of contents
IntroductionUpgrading to PowerShell 7 Breaks cd - BehaviorMy Full $PROFILEConclusionResources

Sort: