<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>How-To on Eriteach | Microsoft Cloud Tech</title><link>https://blog.eriteach.com/en/tags/how-to/</link><description>Recent content in How-To on Eriteach | Microsoft Cloud Tech</description><generator>Hugo -- 0.155.1</generator><language>en</language><copyright>2024-2026 Robel Mehari. All rights reserved.</copyright><lastBuildDate>Wed, 15 Apr 2026 13:27:07 +0200</lastBuildDate><atom:link href="https://blog.eriteach.com/en/tags/how-to/index.xml" rel="self" type="application/rss+xml"/><item><title>Hunting Zombie Software: Automating the Removal of Unauthorized and End-of-Support Apps with Intune</title><link>https://blog.eriteach.com/en/posts/zombie-apps-removal-intune-proactive-remediation/</link><pubDate>Wed, 15 Apr 2026 10:00:00 +0200</pubDate><guid>https://blog.eriteach.com/en/posts/zombie-apps-removal-intune-proactive-remediation/</guid><description>Learn how to use Intune Proactive Remediations to hunt down and remove unauthorized, end-of-life, and unsupported software across your Windows fleet.</description><content:encoded><![CDATA[<p>Users with local admin rights are the natural enemy of a clean software inventory. They install unapproved browsers, outdated image editors, and &ldquo;handy&rdquo; utilities that quickly become an IT headache. Worse, Microsoft Defender for Endpoint often flags these apps because they are End-of-Life (EOL) or End-of-Support (EOS), creating a massive list of vulnerabilities you didn&rsquo;t even know you had.</p>
<p>Instead of playing whack-a-mole with individual apps, I developed a &ldquo;Master Script&rdquo; approach for Intune Proactive Remediations. This system hunts down &ldquo;zombie software&rdquo; based on a centralized target list and removes it silently.</p>
<h2 id="the-problem-shadow-it-and-defender-alarms">The Problem: Shadow IT and Defender Alarms</h2>
<p>Every IT admin has seen it: Defender&rsquo;s vulnerability management shows 50 devices with an outdated version of GIMP or a random Russian browser like Yandex. These aren&rsquo;t apps you deployed; they were installed by users who &ldquo;just needed it for a second.&rdquo;</p>
<p>These apps create two major issues:</p>
<ol>
<li><strong>Security Risk:</strong> EOL software doesn&rsquo;t get patches. It&rsquo;s a &ldquo;zombie&rdquo; — it should be dead, but it&rsquo;s still walking around your network.</li>
<li><strong>Operational Noise:</strong> Thousands of Defender alerts for software that shouldn&rsquo;t even be there in the first place.</li>
</ol>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li><strong>Microsoft Intune</strong> with Proactive Remediations enabled (requires Windows 10/11 Enterprise E3/E5).</li>
<li><strong>PowerShell 5.1</strong> (default on Windows).</li>
<li><strong>Local Admin Rights</strong> (The script runs in the SYSTEM context to perform uninstalls).</li>
</ul>
<h2 id="the-strategy-how-the-hunt-works">The Strategy: How the Hunt Works</h2>
<p>The system uses two scripts: a <strong>Detection</strong> script that identifies the presence of unauthorized software, and a <strong>Remediation</strong> script that kills it.</p>
<p>We target software using three methods:</p>
<ol>
<li><strong>Registry GUIDs:</strong> Finding the specific MSI or installer GUID in HKLM.</li>
<li><strong>Wildcard Registry:</strong> Finding keys like <code>HKLM:\... \Uninstall\Opera*</code> to catch versioned installs.</li>
<li><strong>File Paths:</strong> Checking for specific executables in <code>Program Files</code> or <code>AppData</code>.</li>
</ol>
<p>Crucially, the scripts handle <strong>per-user installs</strong> by scanning the <code>HKEY_USERS</code> (HKU) hive, ensuring that apps installed in a user&rsquo;s local profile don&rsquo;t hide from the system.</p>
<h2 id="implementation-the-master-scripts">Implementation: The Master Scripts</h2>
<p>You can find the full scripts in my <a href="https://github.com/Thugney/eriteach-scripts/tree/main/intune/remediations">GitHub repository</a>.</p>
<h3 id="1-the-detection-script">1. The Detection Script</h3>
<p>The detection script iterates through a <code>$zombieTargets</code> array. If any target is found via registry or file path, it exits with <strong>Exit 1</strong>, triggering the remediation.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Example target definition</span>
</span></span><span class="line"><span class="cl"><span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">Name</span>          <span class="p">=</span> <span class="s2">&#34;GIMP 2&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="n">Reason</span>        <span class="p">=</span> <span class="s2">&#34;Unauthorized software - Not in approved catalog&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="n">Category</span>      <span class="p">=</span> <span class="s2">&#34;Unauthorized&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="n">DetectionType</span> <span class="p">=</span> <span class="s2">&#34;Both&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="n">RegistryPaths</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span><span class="s2">&#34;HKLM:\GIMP-2_is1&#34;</span><span class="p">,</span> <span class="s2">&#34;HKU:\GIMP-2_is1&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">FilePaths</span>     <span class="p">=</span> <span class="vm">@</span><span class="p">(</span><span class="s2">&#34;C:\Program Files\GIMP 2\bin\gimp-2.10.exe&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">Enabled</span>       <span class="p">=</span> <span class="vm">$true</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span></code></pre></div><h3 id="2-the-remediation-script">2. The Remediation Script</h3>
<p>When triggered, the remediation script attempts the following in order:</p>
<ol>
<li><strong>Silent Uninstall:</strong> It reads the <code>UninstallString</code> from the registry and injects silent flags (<code>/S</code>, <code>/qn</code>, <code>/VERYSILENT</code>).</li>
<li><strong>Folder Removal:</strong> If the registry uninstall fails or isn&rsquo;t available, it forcefully stops any running processes and deletes the application folder.</li>
</ol>
<h2 id="verification-how-to-know-it-worked">Verification: How to Know it Worked</h2>
<ol>
<li><strong>Intune Console:</strong> Check the <strong>Proactive Remediations</strong> blade. You should see &ldquo;Issue fixed&rdquo; for devices where software was removed.</li>
<li><strong>Local Logs:</strong> The scripts write detailed logs to <code>C:\ProgramData\Eriteach\Logs\</code>.</li>
<li><strong>Defender for Endpoint:</strong> After a few days, watch your &ldquo;Software Inventory&rdquo; and &ldquo;Vulnerabilities&rdquo; dashboards clean up as the zombie apps disappear.</li>
</ol>
<h2 id="troubleshooting">Troubleshooting</h2>
<ul>
<li><strong>Process Blocking:</strong> Some apps might fail to uninstall if they are in use. The remediation script tries to stop known processes, but stubborn apps may require a reboot.</li>
<li><strong>Installer Prompts:</strong> If an app uses a non-standard installer that doesn&rsquo;t support silent flags, the script will fall back to folder removal.</li>
<li><strong>Dependency Risks:</strong> Be careful when targeting runtimes like <code>.NET</code> or <code>Visual C++</code>. Some legacy line-of-business (LOB) apps might depend on them. Always test on a pilot group first.</li>
</ul>
<h2 id="summary">Summary</h2>
<p>Don&rsquo;t let unauthorized and outdated software clutter your environment and bloat your vulnerability reports. By using a centralized &ldquo;Zombie Software&rdquo; hunt with Intune, you can automate your cleanup and ensure only approved, secure applications remain on your devices.</p>
]]></content:encoded></item></channel></rss>