Windows Terminal - PowerShell customization via oh-my-posh/posh-git Set-Theme error?
Windows Terminal - PowerShell customization via oh-my-posh/posh-git Set-Theme error?
I follow the exact tutorial of Microsoft link: Link Here video link: Video Link Here
I have installed Posh-Git and Oh-My-Posh: via this code -
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
I have installed PSReadLine: via this code -
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
I am also created Microsoft.PowerShell_profile.ps1 file by typing- code $PROFILE, in my PowerShell profile and copy/paste this code:
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
But I get this error:
Set-Theme Paradox The term 'Set-Theme' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
ScreenShot: Screenshot of error
Thanks for letting us know. There's a bunch of discussion over in our documentation repository about this, so I'll have to redirect you there. Cheers!
It seems the "Set-Theme" cmdlet was renamed to "Set-PoshPrompt".
It seems the "Set-Theme" cmdlet was renamed to "Set-PoshPrompt". thank you,i have solved it
Hi! Any updates about it? I've been received the same message error!

Hi! Any updates about it? I've been received the same message error!
please, read the previous comment >>> It seems the "Set-Theme" cmdlet was renamed to "Set-PoshPrompt".
For anyone still struggliong with this issue use Set-PoshPrompt, as JustDre said above, followed by the -Theme option. Here is an example:
Set-PoshPrompt -Theme pixelrobots
I am using posh-git version 1.0.0 and oh-my-posh version 3.157.2.
Hope this helps
It seems the "Set-Theme" cmdlet was renamed to "Set-PoshPrompt".
Yeah it did work fine. Change "Set-Theme" to "Set-PoshPrompt"
I installed the latest version of oh-my-posh i.e. if you follow the guide on microsoft don't use the required version but let it install the latest.
Hey I'm getting this error, does anyone have a fix?
I followed the tutorial in the Terminal docs here

Hey I'm getting this error, does anyone have a fix?
I followed the tutorial in the Terminal docs here
Hey, I had the same issue. I did Update_Module in Powershell, it will update the oh-my-posh module to lastest version (actually all modules, you can also update oh-my-posh only). Then i got no errors. Hope this works for you too.
Hey, thanks for the tip. It's working now!
I was having the same issue as the users above me. I followed the tutorial as well. I believe this error occurs because a command given by the documentation installs an older version, see:
Install-Module oh-my-posh -Scope CurrentUser -RequiredVersion 2.0.412
This conflicts with the given PowerShell configuration, as it is intended for newer versions of oh-my-posh. The version installed by the tutorial command works if you switch from Set-PoshPrompt back to Set-Theme, although I would suggest following the advice given above - although a small correction is required, since the command is Update-Module instead of Update_Module.
I've tried all the above things, but still some error.
> Set-PoshPrompt -Theme Paradox
& : The term 'C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Modules\oh-my-posh\3.133.1\bin\posh-windows-amd64.exe'
is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:1 char:23
+ ... ression (@(&"C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Modules ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\<username>\...ndows-amd64.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Invoke-Expression : Cannot bind argument to parameter 'Command' because it is an empty string.
At line:1 char:19
+ ... -Expression (@(&"C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Mod ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Invoke-Expression], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Invo
keExpressionCommand
I don't know where the path C:\Users\oro36\OneDrive\문서\WindowsPowerShell\Modules\oh-my-posh\3.133.1\bin\posh-windows-amd64.exe came from.
from what I've checked, that path doesn't exist on my device.
Strangely enough, Set-Theme works.
> Set-Theme Paradox
Hi there!
It seems you're using an oh-my-posh V2 cmdlet while running V3.
To migrate your current setup to V3, have a look the documentation.
https://ohmyposh.dev/docs/upgrading
Hi there!
It seems you're using an oh-my-posh V2 cmdlet while running V3.
To migrate your current setup to V3, have a look the documentation.
https://ohmyposh.dev/docs/upgrading
(it actually printed out twice)
> Set-PoshPrompt Paradox
& : The term 'C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Modules\oh-my-posh\3.133.1\bin\posh-windows-amd64.exe'
so I went to the mentioned site, then ran Update-Module -Name oh-my-posh -Scope CurrentUser, but nothing changed.
after I delete forcibly the "...\OneDrive\document\WindowsPowerShell\Modules\oh-my-posh" and install oh-my-posh by using choco, it works.
sorry I think it was just another path issue that doesn't relate to this issue.
I've tried all the above things, but still some error.
> Set-PoshPrompt -Theme Paradox & : The term 'C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Modules\oh-my-posh\3.133.1\bin\posh-windows-amd64.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:23 + ... ression (@(&"C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Modules ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Users\<username>\...ndows-amd64.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Invoke-Expression : Cannot bind argument to parameter 'Command' because it is an empty string. At line:1 char:19 + ... -Expression (@(&"C:\Users\<username>\OneDrive\문서\WindowsPowerShell\Mod ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Invoke-Expression], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Invo keExpressionCommandI don't know where the path
C:\Users\oro36\OneDrive\문서\WindowsPowerShell\Modules\oh-my-posh\3.133.1\bin\posh-windows-amd64.execame from. from what I've checked, that path doesn't exist on my device.
It works without the -Theme flag. Do this: Set-PoshPrompt Paradox
Just use
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
on Microsoft.PowerShell_profile.ps1 file and enjoy.
For anyone still struggliong with this issue use Set-PoshPrompt, as JustDre said above, followed by the -Theme option. Here is an example:
Set-PoshPrompt -Theme pixelrobotsI am using posh-git version 1.0.0 and oh-my-posh version 3.157.2. Hope this helps Set-PoshPrompt -Theme Paradox work!
Hey I'm getting this error, does anyone have a fix this error ? I'm trying to fix this error since last 3 days. But i can't do this properly because I'm new here in this sector. Anybody help me.

@najima1 From literally 8 comments up in this thread: https://github.com/microsoft/terminal/issues/9237#issuecomment-897701306
I did
Update_Modulein Powershell, it will update the oh-my-posh module to lastest version
I did Update-Module in Powershell,