[wpkg-users] Powershell and windows update...
Marco Gaiarin
gaio at lilliput.linux.it
Fri Jul 14 14:37:30 CEST 2023
> But i've not found a way to import the module permanently in powershell; eg,
Found a way to import for every PS call:
<package
id="10tweaks-disable-kb5028166"
name="Win10 tweaks: disable KB5028166"
revision="20230713:0"
reboot="false"
priority="5">
<depends package-id="win-ps-wu"/>
<check type="execute" condition="exitcodeequalto" path='%COMSPEC% /c powershell -Command "Import-Module PSWindowsUpdate; Get-WindowsUpdate -KBArticleID KB5028166 -IsHidden" | find "KB5028166"' value
<install cmd='powershell -command "Import-Module PSWindowsUpdate; Hide-WindowsUpdate -KBArticleID KB5028166 -Confirm:$false | Out-Null"' />
<upgrade include='install' />
<downgrade include='upgrade' />
<remove cmd='powershell -command "Import-Module PSWindowsUpdate; Get-WindowsUpdate -KBArticleID KB5028166 -WithHidden -Hide:$false -Confirm:$false | Out-Null"' />
</package>
--
Raramente chi spara cazzate finisce subito le munizioni.
(Anonimo)
More information about the wpkg-users
mailing list