diff --git a/website/docs/installation/prompt.mdx b/website/docs/installation/prompt.mdx index ce64b669..7b4c08af 100644 --- a/website/docs/installation/prompt.mdx +++ b/website/docs/installation/prompt.mdx @@ -48,6 +48,17 @@ Then add the following line. ```powershell oh-my-posh init pwsh | Invoke-Expression ``` + +:::warning Antivirus software +If adding an exception to your Antivirus software still blocks Oh My Posh for Windows, you can try using the below +alternate line in your PowerShell profile. This is a drop-in replacement to the above call with Invoke-Expression. +Tested with PowerShell 7.2.4 with Bitdefender Antivirus installed and requires NO exceptions for oh-my-posh.exe. +Bitdefender blocks the calls to Invoke-Expression as malicious code and this alternate line skips the double calls: + +```powershell +& ([ScriptBlock]::Create((oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" --print) -join "`n")) +``` +::: Once added, reload your profile for the changes to take effect.