DEV Community


Discussion on: My powershell configuration

seefer007 profile image
Darren Evans

Powershell on my laptop and desktop PC point to the same .ps1 file on my OneDrive. I created two oh-my-posh themes, one for my desktop that does not display battery status and one for my laptop that does display battery status.

How do I load a theme depending on whether it's my laptop running PowerShell or my desktop if PowerShell on both my machines is pointing to the same .ps1 $profile in OneDrive? I suspect I need to have my laptop and desktop PowerShell $profile variable pointing to a file stored locally on the respective machine. How do I do this?

dialguiba profile image
Diego Author

Hello, why dont you create a conditional in your profile that could load a different theme depending on information about the system?. I think that you can retrieve information about your system using get-computerInfo.