Microsoft Update files management via wusa.exe
Thomas Lemarchand
Windows
PowerShell
New in version 2018.3.4.
Install a KB from a .msu file.
True
if successful, otherwise False
CommandExecutionError -- If the package is already installed or an error is encountered
CLI Example:
salt '*' wusa.install C:/temp/KB123456.msu
Check if a specific KB is installed.
name (str) -- The name of the KB to check
True
if installed, otherwise False
CLI Example:
salt '*' wusa.is_installed KB123456
Get a list of updates installed on the machine
A list of installed updates
CLI Example:
salt '*' wusa.list
Uninstall a specific KB.
path (str) -- The full path to the msu file to uninstall. This can also be just the name of the KB to uninstall
restart (bool) -- True
to force a restart if required by the installation. Adds
the /forcerestart
switch to the wusa.exe
command. False
will add the /norestart
switch instead. Default is False
True
if successful, otherwise False
CommandExecutionError -- If an error is encountered
CLI Example:
salt '*' wusa.uninstall KB123456
# or
salt '*' wusa.uninstall C:/temp/KB123456.msu