From d83af96d7aa7f35093c37424020b4ffeb2b3c755 Mon Sep 17 00:00:00 2001 From: Cody Scavenger <94334877+CodyScavenger@users.noreply.github.com> Date: Wed, 15 Jun 2022 22:57:35 -0400 Subject: [PATCH] docs: update website/docs/installation/prompt.mdx --- website/docs/installation/prompt.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) 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.