salt.modules.win_wusa#
Microsoft Update files management via wusa.exe
- maintainer:
Thomas Lemarchand
- platform:
Windows
- depends:
PowerShell
New in version 2018.3.4.
- salt.modules.win_wusa.install(path, restart=False)#
Install a KB from a .msu file.
- Parameters:
- Returns:
Trueif successful, otherwiseFalse.- Return type:
- Raises:
CommandExecutionError -- If the package is already installed or an error is encountered
CLI Example:
salt '*' wusa.install C:/temp/KB123456.msu
- salt.modules.win_wusa.is_installed(name)#
Check if a specific KB is installed.
- Parameters:
name (str) -- The name of the KB to check.
- Returns:
Trueif installed, otherwiseFalse.- Return type:
CLI Example:
salt '*' wusa.is_installed KB123456
- salt.modules.win_wusa.list_()#
Get a list of updates installed on the machine.
- Returns:
A list of installed updates.
- Return type:
CLI Example:
salt '*' wusa.list
- salt.modules.win_wusa.uninstall(path, restart=False)#
Uninstall a specific KB.
- Parameters:
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, optional) --Trueto force a restart if required by the installation. Adds the/forcerestartswitch to thewusa.execommand.Falsewill add the/norestartswitch instead.Default is
False.
- Returns:
Trueif successful, otherwiseFalse.- Return type:
- Raises:
CommandExecutionError -- If an error is encountered
CLI Example:
salt '*' wusa.uninstall KB123456 # or salt '*' wusa.uninstall C:/temp/KB123456.msu