[wpkg-users] Powershell and windows update...
Bernhard Mayr
bmmayr at gmail.com
Thu Jul 13 13:32:06 CEST 2023
On Windows server editions, Windows has a command line utility (maybe on
other editions too) called sconfig.cmd in C:\Windows\System32, which also
installs updates. The heavy lifting installing updates is done by the VBS
script WUA_SearchDownloadInstall.vbs also in C:\Windows\System32 or a
language specific subdirectory.
This script searches, download and installs updates in the background
without any user interaction, It does so by creating aVBS installer object
and using its methods.
I use a slightly modified version to install updates via WPKG by running
the VBS script with cscript.
Analyzing this script should give you hints how to uninstall without any
user interaction the way microsoft does it.
Good luck
Bernhard
Am Do., 13. Juli 2023 um 13:10 Uhr schrieb Marco Gaiarin <
gaio at lilliput.linux.it>:
>
> I need to uninstall KB5028166, via WPKG. I've found thati need to install
> 'WU powershell addon/modules', via:
>
> Install-PackageProvider -Name NuGet -Force
> Install-Module -Name PSWindowsUpdate -Force
> Set-ExecutionPolicy RemoteSigned -Force
> Import-Module PSWindowsUpdate
>
> there's some example on powershell module import? how i can write check
> conditions?
>
>
> Then i need to uninstall the KB; but seems that nor:
>
> wusa /uninstall /kb:5028166 /quiet /norestart
>
> nether:
> Remove-WindowsUpdate -KBArticleID KB5028166 -IgnoreReboot
> -Confirm:$false
>
> works. Only:
>
> wusa /uninstall /kb:5028166
>
> work, clearly non in silent mode.
>
>
> If someone have some clue, thanks.
>
> --
> Risulterebbe che i due ladroni crocefissi accanto al Signore fossero
> socialisti: infatti erano ladri e occupavano due posti su tre.
> (Anonimo)
>
>
> ---------------------------------
> wpkg-users mailing list archives >>
> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/wpkg-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20230713/b592ad5a/attachment.html>
More information about the wpkg-users
mailing list