How to Automatically Load Personal and System Profiles in PowerShell 7 with Oh My Posh?

37 views Asked by At

After installing Oh My Posh on my Windows 11 default PowerShell terminal, it worked perfectly. However, upon upgrading to PowerShell 7 (via the official .msi installer), my terminal reverted to the plain, pre-Oh My Posh appearance. It seems that my system profile, which includes the Oh My Posh configuration, isn't being loaded automatically in PowerShell 7. I'm including screenshots of both the working setup in the default PowerShell and the current state in PowerShell 7 for clarity.

How can I ensure that both my personal and system profiles are automatically loaded when I open PowerShell 7, thereby retaining the Oh My Posh configuration across sessions?

Any guidance on resolving this issue would be greatly appreciated.

PowerShell 5

PowerShell 7

1

There are 1 answers

0
Jan De Dobbeleer On

You need to configure the $profile of PowerShell 7 separately. They use a different one, there's no global configuration unless you source one from the other (which I wouldn't advise).