Unexpected return value of $Host.UI.SupportsVirtualTerminal #17951

Open
opened 2026-01-31 05:59:29 +00:00 by claunia · 0 comments
Owner

Originally created by @RuntimeErrorz on GitHub (Jul 17, 2022).

Windows Terminal version

1.14.1861.0

Windows build number

10.0.19044.0

Other Software

Oh My Posh version 8.17.1

Steps to reproduce

  1. Configure Oh My Posh(Not necessary)
  2. Input $Host.UI.SupportsVirtualTerminal in Windows Terminal

Expected Behavior

The terminal outputs True. And terminal's appearance looks like this.
image

Actual Behavior

The terminal outputs False. The terminal's appearance looks like this.
image

I have discussed this question in oh-my-posh community, they are sure it's not an issue of Oh My Posh. They believe the output of "$Host.UI.SupportsVirtualTerminal" is the key.
And it's weird since the "virtual terminal processing" (see MS docs) should have been enabled by default in Windows Terminal.
Even after I uninstalled oh-my-posh and reinstaledl Windows Termainl, $Host.UI.SupportsVirtualTerminal still returns False. But another computer's $Host.UI.SupportsVirtualTerminal returns True at all times.

Originally created by @RuntimeErrorz on GitHub (Jul 17, 2022). ### Windows Terminal version 1.14.1861.0 ### Windows build number 10.0.19044.0 ### Other Software Oh My Posh version 8.17.1 ### Steps to reproduce 1. Configure `Oh My Posh`(Not necessary) 2. Input `$Host.UI.SupportsVirtualTerminal` in Windows Terminal ### Expected Behavior The terminal outputs `True`. And terminal's appearance looks like this. ![image](https://user-images.githubusercontent.com/71929239/179397291-a12d9c0c-f128-4d28-9b28-9866d2a1e60d.png) ### Actual Behavior The terminal outputs `False`. The terminal's appearance looks like this. ![image](https://user-images.githubusercontent.com/71929239/179397275-c95506e4-668a-4bda-a593-91959d555b2c.png) I have discussed this question in oh-my-posh community, they are sure it's not an issue of `Oh My Posh`. They believe the output of "$Host.UI.SupportsVirtualTerminal" is the key. And it's weird since the "virtual terminal processing" (see [MS docs](https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences)) should have been enabled by default in Windows Terminal. Even after I uninstalled oh-my-posh and reinstaledl Windows Termainl, `$Host.UI.SupportsVirtualTerminal` still returns `False`. But another computer's `$Host.UI.SupportsVirtualTerminal` returns `True` at all times.
claunia added the Needs-TriageIssue-BugNeeds-Tag-Fix labels 2026-01-31 05:59:29 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17951