<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: J. Maurício V. L. Júnior (Maurício Júnior)</title>
    <description>The latest articles on DEV Community by J. Maurício V. L. Júnior (Maurício Júnior) (@mauricio_moriah).</description>
    <link>https://dev.to/mauricio_moriah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3958634%2F612ced76-c712-4485-b96e-6f6656a02b6d.jpg</url>
      <title>DEV Community: J. Maurício V. L. Júnior (Maurício Júnior)</title>
      <link>https://dev.to/mauricio_moriah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mauricio_moriah"/>
    <language>en</language>
    <item>
      <title>PowerShell 7 Taking 30+ Seconds to Open After Windows Update — Root Cause Found</title>
      <dc:creator>J. Maurício V. L. Júnior (Maurício Júnior)</dc:creator>
      <pubDate>Fri, 29 May 2026 14:31:21 +0000</pubDate>
      <link>https://dev.to/mauricio_moriah/powershell-7-taking-30-seconds-to-open-after-windows-update-root-cause-found-3ej6</link>
      <guid>https://dev.to/mauricio_moriah/powershell-7-taking-30-seconds-to-open-after-windows-update-root-cause-found-3ej6</guid>
      <description>&lt;h1&gt;
  
  
  PowerShell 7 Taking 30+ Seconds to Open After Windows Update — Root Cause Found
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;A deep-dive diagnostic that led to an unexpected culprit: a corrupted Windows Terminal COM registration.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Symptoms
&lt;/h2&gt;

&lt;p&gt;After a Windows Update (KB5089549 / KB5087051, installed May 21, 2026), PowerShell 7 started taking &lt;strong&gt;30–35 seconds to open&lt;/strong&gt; — every single time, from any launcher: Win+R, Start Menu, Command Prompt, double-clicking &lt;code&gt;pwsh.exe&lt;/code&gt; directly.&lt;/p&gt;

&lt;p&gt;At the same time, Unicode characters in terminal tools (like Claude Code's &lt;code&gt;⏵⏵&lt;/code&gt; status indicators) started showing as &lt;strong&gt;blank squares&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These seemed like two separate problems. They weren't.&lt;/p&gt;




&lt;h2&gt;
  
  
  What We Ruled Out
&lt;/h2&gt;

&lt;p&gt;Before finding the real cause, we went through the usual suspects — all of which turned out to be dead ends:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Hypothesis&lt;/th&gt;
&lt;th&gt;Test&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Heavy &lt;code&gt;$PROFILE&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;pwsh -NoProfile&lt;/code&gt; from Win+R&lt;/td&gt;
&lt;td&gt;Still 34s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network paths in &lt;code&gt;$PATH&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;`$env:PATH -split ';' \&lt;/td&gt;
&lt;td&gt;Where-Object { $_ -like '\*' }`&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows Defender scanning&lt;/td&gt;
&lt;td&gt;Added exclusion for &lt;code&gt;C:\Program Files\PowerShell\7&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;No change&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SmartScreen / CRL check&lt;/td&gt;
&lt;td&gt;Tested in Airplane Mode&lt;/td&gt;
&lt;td&gt;Still 34s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Smart App Control&lt;/td&gt;
&lt;td&gt;Checked Windows Security&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory Integrity (HVCI)&lt;/td&gt;
&lt;td&gt;Checked Core Isolation settings&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Third-party antivirus&lt;/td&gt;
&lt;td&gt;None installed&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Store app (AppX) overhead&lt;/td&gt;
&lt;td&gt;Installed MSI version instead&lt;/td&gt;
&lt;td&gt;Still 34s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows Defender (full)&lt;/td&gt;
&lt;td&gt;Disabled real-time protection entirely&lt;/td&gt;
&lt;td&gt;Still 34s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every classic explanation failed. Time for deeper tooling.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Diagnostic: Process Monitor
&lt;/h2&gt;

&lt;p&gt;Using &lt;strong&gt;Sysinternals Process Monitor&lt;/strong&gt; (ProcMon), we captured all activity during a slow &lt;code&gt;pwsh.exe&lt;/code&gt; launch and filtered by the process name.&lt;/p&gt;

&lt;p&gt;The log revealed a striking pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;10:53:10  pwsh.exe   Thread Create       ← process starts
10:53:10  pwsh.exe   Load Image ntdll.dll
10:53:10  pwsh.exe   Load Image kernel32.dll
10:53:10  pwsh.exe   Load Image KernelBase.dll
10:53:10  pwsh.exe   Process Create → conhost.exe (PID 22716)
            ← NO ACTIVITY FOR 35 SECONDS →
10:53:45  pwsh.exe   Load Image sechost.dll
10:53:45  pwsh.exe   Load Image rpcrt4.dll
10:53:45  pwsh.exe   Load Image imm32.dll
            ← normal startup continues →
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;35 seconds of complete silence&lt;/strong&gt; — no file I/O, no registry reads, no network calls. The process was alive (visible in Process Profiling entries) but fully blocked on something in memory.&lt;/p&gt;




&lt;h2&gt;
  
  
  Following the conhost Trail
&lt;/h2&gt;

&lt;p&gt;The last operation before the freeze was &lt;code&gt;pwsh.exe&lt;/code&gt; creating &lt;code&gt;conhost.exe&lt;/code&gt; with PID 22716:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pwsh.exe → Process Create → &lt;span class="se"&gt;\?&lt;/span&gt;?&lt;span class="se"&gt;\C&lt;/span&gt;:&lt;span class="se"&gt;\W&lt;/span&gt;INDOWS&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\c&lt;/span&gt;onhost.exe 0xffffffff &lt;span class="nt"&gt;-ForceV1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Switching the ProcMon filter to conhost PID 22716 revealed exactly what it was doing during those 35 seconds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HKCR\PackagedCom\Package\
  Microsoft.WindowsTerminal_1.24.11321.0_x64__8wekyb3d8bbwe\
    Server\0\ApplicationId        → "App"
    Server\0\DisplayName          → "OpenConsole"
    Server\0\Executable           → "OpenConsole.exe"
    Server\0\RuntimeBehavior      → 1
    ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;conhost was trying to activate Windows Terminal as its console host via COM.&lt;/strong&gt; It found the package registration in the registry (&lt;code&gt;HKCR\PackagedCom\Package\Microsoft.WindowsTerminal_*&lt;/code&gt;), attempted to activate &lt;code&gt;OpenConsole.exe&lt;/code&gt;, got no response — and waited &lt;strong&gt;35 seconds for the COM activation to timeout&lt;/strong&gt; before falling back to legacy conhost mode.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Root Cause
&lt;/h2&gt;

&lt;p&gt;The Windows Update had corrupted the Windows Terminal package. The app appeared as "Installed" in the Microsoft Store, but the actual package was broken — &lt;code&gt;OpenConsole.exe&lt;/code&gt; could not be activated.&lt;/p&gt;

&lt;p&gt;This created a hidden failure loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Any console app starts (pwsh, cmd, etc.)
  → Windows creates conhost.exe
  → conhost checks for a registered terminal server
  → Finds Windows Terminal (Microsoft.WindowsTerminal_1.24.11321.0) in PackagedCom registry
  → Attempts COM activation of OpenConsole.exe
  → Package is broken → activation hangs
  → 35-second COM timeout fires
  → Falls back to legacy V1 conhost
  → Console app finally gets its window
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;This affected every console application on the system&lt;/strong&gt; — not just PowerShell.&lt;/p&gt;

&lt;p&gt;The Unicode rendering issue was a side effect: because Windows Terminal (which handles font fallback gracefully) was unavailable, the user was stuck with legacy conhost, which has no font fallback and can't render glyphs like &lt;code&gt;⏵&lt;/code&gt; (U+23F5) that aren't explicitly in the configured font.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fix
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Quick workaround&lt;/strong&gt; (stops the timeout immediately):&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Settings → System → For Developers → Terminal → change from &lt;strong&gt;"Windows Terminal"&lt;/strong&gt; to &lt;strong&gt;"Windows Console Host"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This tells conhost not to attempt Windows Terminal delegation, eliminating the 35-second COM timeout instantly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Permanent fix&lt;/strong&gt; (reinstall Windows Terminal cleanly):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Remove the corrupted package&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Get-AppxPackage&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Microsoft.WindowsTerminal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Remove-AppxPackage&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Reinstall via winget&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;winget&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Microsoft.WindowsTerminal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-e&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then go back to Settings → System → For Developers → Terminal and set it back to &lt;strong&gt;Windows Terminal&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Result: PowerShell opens in under 1 second, Unicode renders correctly, everything back to normal.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. ProcMon is indispensable for startup timing issues.&lt;/strong&gt;&lt;br&gt;
When all the usual suspects (Defender, SmartScreen, profile, PATH) are ruled out, the only way to find a 35-second gap with zero I/O is to look at the actual event trace.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. "Installed" doesn't mean "working."&lt;/strong&gt;&lt;br&gt;
The Microsoft Store reported Windows Terminal as installed. The COM registration was intact. But the package was functionally broken. No UI-level tool would have surfaced this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. conhost delegates to Windows Terminal on every console app launch.&lt;/strong&gt;&lt;br&gt;
This is by design — it's how Windows Terminal integrates transparently with any console application. But it means a broken Windows Terminal silently degrades &lt;em&gt;every&lt;/em&gt; console app on the system, not just Terminal itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Two seemingly unrelated symptoms, one root cause.&lt;/strong&gt;&lt;br&gt;
Slow startup and broken Unicode looked like separate issues. They were the same corrupted package viewed from different angles.&lt;/p&gt;




&lt;h2&gt;
  
  
  Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Windows 11 Pro 10.0.26200&lt;/li&gt;
&lt;li&gt;PowerShell 7.6.2 (MSI, x64)&lt;/li&gt;
&lt;li&gt;Windows Terminal 1.24.11321.0&lt;/li&gt;
&lt;li&gt;Updates applied: KB5092762 (May 20), KB5089549 + KB5087051 (May 21, 2026)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Diagnosed with the help of &lt;a href="https://claude.ai/code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt; and Sysinternals Process Monitor.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>windows</category>
      <category>powershell</category>
      <category>terminal</category>
      <category>debugging</category>
    </item>
  </channel>
</rss>
