[wpkg-users] Uninstall windows Patches/KB...
Pawel Jagoda
wpkg-users at bluenet.waw.pl
Wed Oct 11 14:02:21 CEST 2023
W dniu 2023-09-15 o 13:27, Marco Gaiarin pisze:
> 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:
>
> https://support.microsoft.com/it-it/topic/september-12-2023-kb5030211-os-builds-19044-3448-and-19045-3448-c0dee353-f025-4f03-bcc1-336f74fb992c
>
> 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.
>
Hi,
You can do this by executing powershell command.
For example:
Using dism command you can find a package which is relied to proper KB:
|dism.exe /online /get-packages /format:table |
or powershell command:
Get-WindowsPackage -Online |ft -Autosize
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:
Package_for_KB5015684~31bf3856ad364e35~x86~~19041.1799.1.2
Installed Update 26.05.2023 12:28:00
If you know package id, you can check it by using powershell command, to
be sure, you are going to uninstall proper KB:
|Get-WindowsPackage -Online -PackageName '*19041.1799.1.2*' |
This command will give you a result similar to this:
||
|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 :
https://support.microsoft.com/help/5015684 PackageState : Installed
CompletelyOfflineCapable : No CapabilityId : Custom Properties : |
And if you are sure about KB (here we have KB5015684), you can uninstall
it non-interactively:
|Get-WindowsPackage -Online -PackageName '*19041.1799.1.2*'
|Remove-WindowsPackage -Online -Verbose|
You can run this command from batch script:
|powershell -noninteractive -Command "Get-WindowsPackage -Online
-PackageName '*19041.1799.1.2*' |Remove-WindowsPackage -Online -Verbose"|
I hope it helps you.
Best Regards,
Pawel Jagoda.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20231011/ce881ee0/attachment.html>
More information about the wpkg-users
mailing list