<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">W dniu 2023-09-15 o 13:27, Marco
Gaiarin pisze:<br>
</div>
<blockquote type="cite"
cite="mid:5lrdtj-d4b1.ln1@hermione.lilliput.linux.it">
<pre class="moz-quote-pre" wrap="">
Supposing i need to uninstall a particular KB, supposing KB5030211.
Normally i do:
wusa /uninstall /kb:5030211 /quiet /norestart
but for that particular KB i cannot use the /quiet switch: uninstallation
simply stall.
Also the KB page:
<a class="moz-txt-link-freetext" href="https://support.microsoft.com/it-it/topic/september-12-2023-kb5030211-os-builds-19044-3448-and-19045-3448-c0dee353-f025-4f03-bcc1-336f74fb992c">https://support.microsoft.com/it-it/topic/september-12-2023-kb5030211-os-builds-19044-3448-and-19045-3448-c0dee353-f025-4f03-bcc1-336f74fb992c</a>
report:
If you want to remove the LCU
To remove the LCU after installing the combined SSU and LCU package, use the DISM/Remove-Package command line option with the LCU package name as the argument. You can find the package name by using this command: DISM /online /get-packages.
Running Windows Update Standalone Installer (wusa.exe) with the /uninstall switch on the combined package will not work because the combined package contains the SSU. You cannot remove the SSU from the system after installation.
and effectively using:
DISM.exe /Online /Remove-Package /PackageName:<name> /quiet
works as expected BUT... '<name>' seems totally unrelated to KB name.
How can i map, possibly automatically, KB name and Package name?
Thanks.
</pre>
</blockquote>
<p><br>
</p>
<p>Hi,</p>
<p>You can do this by executing powershell command.</p>
<p><br>
For example:</p>
<p>Using dism command you can find a package which is relied to
proper KB:<br>
</p>
<pre class="has-inner-focus"><code>dism.exe /online /get-packages /format:table
</code></pre>
<p>or powershell command: <br>
</p>
<pre class="has-inner-focus">Get-WindowsPackage -Online |ft -Autosize</pre>
<p><br>
</p>
<p>Note that dism command doesn't always show full KB name (or I
don't know how to force it to show it), but result can filtered by
install date. Using powershell command (I think it's better than
dism) you will get a result with all updates formatted like this:</p>
<pre class="has-inner-focus">Package_for_KB5015684~31bf3856ad364e35~x86~~19041.1799.1.2
Installed Update 26.05.2023 12:28:00</pre>
<p><br>
</p>
<p><br>
If you know package id, you can check it by using powershell
command, to be sure, you are going to uninstall proper KB:</p>
<pre class="has-inner-focus"><code>Get-WindowsPackage -Online -PackageName '*19041.1799.1.2*'
</code></pre>
<p>This command will give you a result similar to this:<br>
</p>
<p><code></code></p>
<pre class="has-inner-focus"><code>
PackageName : Package_for_KB5015684~31bf3856ad364e35~x86~~19041.1799.1.2
Applicable : True
Copyright : Microsoft Corporation
Company : Microsoft Corporation
CreationTime : 10.02.1601 21:24:00
Description : Fix for KB5015684
InstallClient : UpdateAgentLCU
InstallPackageName : Package_for_KB5015684~31bf3856ad364e35~x86~~19041.1799.1.2.mum
InstallTime : 26.05.2023 12:28:58
LastUpdateTime : 10.02.1601 21:24:00
DisplayName : Feature Update to Windows 10 22H2 via Enablement Package (KB5015684)
ProductName : Package_for_KB5015684
ProductVersion :
ReleaseType : Update
RestartRequired : Required
SupportInformation : <a class="moz-txt-link-freetext" href="https://support.microsoft.com/help/5015684">https://support.microsoft.com/help/5015684</a>
PackageState : Installed
CompletelyOfflineCapable : No
CapabilityId :
Custom Properties :
</code></pre>
<p><br>
</p>
<p>And if you are sure about KB (here we have KB5015684), you can
uninstall it non-interactively:</p>
<pre class="has-inner-focus"><code>Get-WindowsPackage -Online -PackageName '*19041.1799.1.2*' |Remove-WindowsPackage -Online -Verbose</code></pre>
<br>
<p>You can run this command from batch script:</p>
<pre class="has-inner-focus"><code> powershell -noninteractive -Command "Get-WindowsPackage -Online -PackageName '*19041.1799.1.2*' |Remove-WindowsPackage -Online -Verbose"</code></pre>
<p><br>
</p>
<p>I hope it helps you.</p>
<p><br>
</p>
<p><br>
</p>
<p>Best Regards,<br>
Pawel Jagoda.<br>
</p>
</body>
</html>