salt.modules.win_wua#

Module for managing Windows Updates using the Windows Update Agent.

List updates on the system using the following functions:

This is an easy way to find additional information about updates available to to the system, such as the GUID, KB number, or description.

Once you have the GUID or a KB number for the update you can get information about the update, download, install, or uninstall it using these functions:

The get function expects a name in the form of a GUID, KB, or Title and should return information about a single update. The other functions accept either a single item or a list of items for downloading/installing/uninstalling a specific list of items.

The win_wua.list and win_wua.get functions are utility functions. In addition to returning information about updates they can also download and install updates by setting download=True or install=True. So, with py:func:win_wua.list <salt.modules.win_wua.list_> for example, you could run the function with the filters you want to see what is available. Then just add install=True to install everything on that list.

If you want to download, install, or uninstall specific updates, use win_wua.download, win_wua.install, or win_wua.uninstall. To update your system with the latest updates use win_wua.list and set install=True

You can also adjust the Windows Update settings using the win_wua.set_wu_settings function. This function is only supported on the following operating systems:

  • Windows Vista / Server 2008

  • Windows 7 / Server 2008R2

  • Windows 8 / Server 2012

  • Windows 8.1 / Server 2012R2

As of Windows 10 and Windows Server 2016, the ability to modify the Windows Update settings has been restricted. The settings can be modified in the Local Group Policy using the lgpo module.

Note

Troubleshooting an update that reports success but doesn't persist

If win_wua.install reports success but the update does not appear installed after a reboot, start with win_wua.get_needs_reboot to make sure no reboot is already pending (installing/resetting while a reboot is pending can itself be the cause). Next use win_wua.get_cbs_log and win_wua.get_windows_update_log to look for the underlying servicing-stack (CBS) or Windows Update Agent error -- install()'s return value only reflects the installer job's result at call time, not whether the update actually persisted through a required reboot. To confirm persistence, re-run win_wua.installed or win_wua.get after the reboot completes and compare against what was requested. Only after the logs point at WUA datastore/catalog-cache corruption specifically should you reach for win_wua.reset (or win_wua.reset_datastore / win_wua.reset_catroot) as a troubleshooting last resort -- these do not fix component-store (CBS)-level rejections, which require DISM /Cleanup-Image /RestoreHealth instead.

New in version 2015.8.0.

depends:

salt.utils.win_update

salt.modules.win_wua.available(software=True, drivers=True, summary=False, skip_installed=True, skip_hidden=True, skip_mandatory=False, skip_reboot=False, categories=None, severities=None, online=True)#

New in version 2017.7.0.

List updates that match the passed criteria. This allows for more filter options than list(). Good for finding a specific GUID or KB.

Parameters:
  • software (bool, optional) --

    Include software updates in the results.

    Default is True.

  • drivers (bool, optional) --

    Include driver updates in the results.

    Default is True.

  • summary (bool, optional) --

    • True: Return a summary of updates available for each category.

    • False (default): Return a detailed list of available updates.

    Default is False.

  • skip_installed (bool, optional) --

    Skip updates that are already installed.

    Default is True.

  • skip_hidden (bool, optional) --

    Skip updates that have been hidden.

    Default is True.

  • skip_mandatory (bool, optional) --

    Skip mandatory updates.

    Default is False.

  • skip_reboot (bool, optional) --

    Skip updates that require a reboot.

    Default is False.

  • categories (list, optional) --

    Specify the categories to list. Must be passed as a list. All categories returned by default.

    Categories include the following:

    • Critical Updates

    • Definition Updates

    • Drivers (make sure you set drivers=True)

    • Feature Packs

    • Security Updates

    • Update Rollups

    • Updates

    • Update Rollups

    • Windows 7

    • Windows 8.1

    • Windows 8.1 drivers

    • Windows 8.1 and later drivers

    • Windows Defender

    Default is None.

  • severities (list, optional) --

    Specify the severities to include. Must be passed as a list. All severities returned by default.

    Severities include the following:

    • Critical

    • Important

    Default is None.

  • online (bool, optional) --

    Tells the Windows Update Agent go online to update its local update database. True will go online. False will use the local update database as is. Default is True

    New in version 3001.

    Default is True.

Returns:

Returns a dict containing either a summary or a list of updates:

Dict of Updates:
{'<GUID>': {
    'Title': <title>,
    'KB': <KB>,
    'GUID': <the globally unique identifier for the update>,
    'Description': <description>,
    'Downloaded': <has the update been downloaded>,
    'Installed': <has the update been installed>,
    'Mandatory': <is the update mandatory>,
    'UserInput': <is user input required>,
    'EULAAccepted': <has the EULA been accepted>,
    'Severity': <update severity>,
    'NeedsReboot': <is the update installed and awaiting reboot>,
    'RebootBehavior': <will the update require a reboot>,
    'Categories': [
        '<category 1>',
        '<category 2>',
        ... ]
}}

Summary of Updates:
{'Total': <total number of updates returned>,
 'Available': <updates that are not downloaded or installed>,
 'Downloaded': <updates that are downloaded but not installed>,
 'Installed': <updates installed (usually 0 unless installed=True)>,
 'Categories': {
    <category 1>: <total for that category>,
    <category 2>: <total for category 2>,
    ... }
}

Return type:

dict

CLI Examples:

# Normal Usage (list all software updates)
salt '*' win_wua.available

# List all updates with categories of Critical Updates and Drivers
salt '*' win_wua.available categories='["Critical Updates","Drivers"]'

# List all Critical Security Updates
salt '*' win_wua.available categories='["Security Updates"]' severities='["Critical"]'

# List all updates with a severity of Critical
salt '*' win_wua.available severities='["Critical"]'

# A summary of all available updates
salt '*' win_wua.available summary=True

# A summary of all Feature Packs and Windows 8.1 Updates
salt '*' win_wua.available categories='["Feature Packs","Windows 8.1"]' summary=True
salt.modules.win_wua.download(names)#

New in version 2017.7.0.

Downloads updates that match the list of passed identifiers. It's easier to use this function by using list_updates and setting download=True.

Parameters:

names (str, list) --

A single update or a list of updates to download. This can be any combination of GUIDs, KB numbers, or names. GUIDs or KBs are preferred.

Note

An error will be raised if there are more results than there are items in the names parameter

Returns:

A dictionary containing the details about the downloaded updates

Return type:

dict

CLI Example:

# Normal Usage
salt '*' win_wua.download names=['12345678-abcd-1234-abcd-1234567890ab', 'KB2131233']
salt.modules.win_wua.get(name, download=False, install=False, online=True)#

New in version 2017.7.0.

Returns details for the named update

Parameters:
  • name (str) -- The name of the update you're searching for. This can be the GUID, a KB number, or any part of the name of the update. GUIDs and KBs are preferred. Run list to get the GUID for the update you're looking for.

  • download (bool, optional) --

    Download the update returned by this function. Run this function first to see if the update exists, then set download=True to download the update.

    Default is False.

  • install (bool, optional) --

    Install the update returned by this function. Run this function first to see if the update exists, then set install=True to install the update.

    Default is False.

  • online (bool, optional) --

    Tells the Windows Update Agent go online to update its local update database. True will go online. False will use the local update database as is.

    Default is True.

    New in version 3001.

Returns:

Returns a dict containing a list of updates that match the name if

download and install are both set to False. Should usually be a single update, but can return multiple if a partial name is given.

If download or install is set to true it will return the results of the operation.

Dict of Updates:
{'<GUID>': {
    'Title': <title>,
    'KB': <KB>,
    'GUID': <the globally unique identifier for the update>,
    'Description': <description>,
    'Downloaded': <has the update been downloaded>,
    'Installed': <has the update been installed>,
    'Mandatory': <is the update mandatory>,
    'UserInput': <is user input required>,
    'EULAAccepted': <has the EULA been accepted>,
    'Severity': <update severity>,
    'NeedsReboot': <is the update installed and awaiting reboot>,
    'RebootBehavior': <will the update require a reboot>,
    'Categories': [
        '<category 1>',
        '<category 2>',
        ... ]
}}

Return type:

dict

CLI Examples:

# Recommended Usage using GUID without braces
# Use this to find the status of a specific update
salt '*' win_wua.get 12345678-abcd-1234-abcd-1234567890ab

# Use the following if you don't know the GUID:

# Using a KB number
# Not all updates have an associated KB
salt '*' win_wua.get KB3030298

# Using part or all of the name of the update
# Could possibly return multiple results
# Not all updates have an associated KB
salt '*' win_wua.get 'Microsoft Camera Codec Pack'
salt.modules.win_wua.get_cbs_log(tail=500, pattern=None, out_file=None, max_matches=200)#

New in version 3009.0.

Retrieves the contents of the Component-Based Servicing (CBS) log, located at %WinDir%\Logs\CBS\CBS.log. This log often contains detailed information about servicing/update failures not present in the Windows Update log -- see win_wua.get_windows_update_log for the complementary agent-level log; a full diagnosis usually needs both.

Note

Things worth searching for in the output: Failed, Reject/rejected (a package the servicing stack refused to (re)apply), resolved as superseded / Resolved(...) state transitions, the specific package identifier (Package_for_KB<number>~...), and HRESULT-style codes (0x800f..., 0x80073...) which map to CBS/servicing-stack error codes -- a distinct range from the 0x8024... WUA-specific codes seen in the Windows Update log. Searching for the KB number (pattern="KB1234567") is usually the fastest way to find the relevant block in a huge log.

Warning

CBS.log can grow very large on long-lived systems. This function defaults to the last 500 lines to stay safe for return over the event bus. Passing tail=None reads the entire file into memory and returns it, which can be slow/large -- prefer pattern to search the whole file for specific terms instead.

Parameters:
  • tail (int, optional) --

    If provided, only the last tail lines of the log are returned/written. Ignored when pattern is provided (which always scans the whole file).

    Default is 500. Pass None to return the entire log.

  • pattern (str, list, optional) --

    One or more plain substrings (case-insensitive) to search for. When provided, returns only matching lines plus a couple of context lines around each match, scanning the whole file regardless of tail.

    Default is None

  • out_file (str, optional) --

    If provided, the resulting (already tailed/filtered) content is also written to this path.

    Default is None

  • max_matches (int, optional) --

    When pattern is used, the maximum number of matches to return.

    Default is 200

Returns:

The contents of the CBS log (or the last tail lines, or the lines matching pattern)

Return type:

str

CLI Example:

salt '*' win_wua.get_cbs_log
salt '*' win_wua.get_cbs_log tail=2000
salt '*' win_wua.get_cbs_log pattern=KB5120233
salt '*' win_wua.get_cbs_log pattern=KB5120233 out_file='C:\temp\cbs_kb.log'
salt.modules.win_wua.get_needs_reboot()#

Determines if the system needs to be rebooted.

Returns:

True if the system requires a reboot, otherwise False

Return type:

bool

CLI Examples:

salt '*' win_wua.get_needs_reboot
salt.modules.win_wua.get_windows_update_log(tail=500, pattern=None, out_file=None, max_matches=200)#

New in version 3009.0.

Merges Windows Update ETW trace files into a single, readable WindowsUpdate.log file using the PowerShell Get-WindowsUpdateLog cmdlet, then returns its contents -- see win_wua.get_cbs_log for the complementary servicing-stack log; a full diagnosis usually needs both. The WU log shows the agent-level request/response, while the CBS log shows what the servicing stack actually did with it.

Note

Things worth searching for in the output: lines tagged FATAL/WARNING (log severity markers), COMAPI entries around the time of the install call (WUA-agent-level install/ download phase transitions), WU-specific HRESULT codes (0x8024... -- distinct from the 0x800f.../0x80073... CBS-range codes seen in win_wua.get_cbs_log), and reportEventBatch/install-phase-completion lines around reboot time.

Warning

This requires an elevated (Administrator) PowerShell session and is only available on Windows 8 / Server 2012 and later. Depending on the amount of Windows Update history on the system, this command can take several minutes to complete -- there is no internal timeout, so a caller needing one should apply it at the job level. The merged output can also be large; this function defaults to the last 500 lines for the same event-bus-size reasons as win_wua.get_cbs_log.

Parameters:
  • tail (int, optional) --

    If provided, only the last tail lines are returned. Ignored when pattern is provided.

    Default is 500. Pass None to return the entire log.

  • pattern (str, list, optional) --

    One or more plain substrings (case-insensitive) to search for, returning only matching lines plus a couple of context lines, scanning the whole file regardless of tail.

    Default is None

  • out_file (str, optional) --

    The path where the full merged log file should be written (used directly as the cmdlet's -LogPath). The function's return value is still the tailed/filtered content, not the full file.

    Default is None, which writes to a temporary location

  • max_matches (int, optional) --

    When pattern is used, the maximum number of matches to return.

    Default is 200

Returns:

The (tailed/filtered) contents of the merged Windows Update log

Return type:

str

CLI Example:

salt '*' win_wua.get_windows_update_log
salt '*' win_wua.get_windows_update_log pattern=0x8024
salt '*' win_wua.get_windows_update_log out_file='C:\temp\WindowsUpdate.log'
salt.modules.win_wua.get_wu_settings()#

Get current Windows Update settings.

Returns:

A dictionary of Windows Update settings:

Featured Updates:

Boolean value that indicates whether to display notifications for featured updates.

Group Policy Required (Read-only):

Boolean value that indicates whether Group Policy requires the Automatic Updates service.

Microsoft Update:

Boolean value that indicates whether to turn on Microsoft Update for other Microsoft Products

Needs Reboot:

Boolean value that indicates whether the machine is in a reboot pending state.

Non Admins Elevated:

Boolean value that indicates whether non-administrators can perform some update-related actions without administrator approval.

Notification Level:

Number 1 to 4 indicating the update level:

  1. Never check for updates

  2. Check for updates but let me choose whether to download and install them

  3. Download updates but let me choose whether to install them

  4. Install updates automatically

Read Only (Read-only):

Boolean value that indicates whether the Automatic Update settings are read-only.

Recommended Updates:

Boolean value that indicates whether to include optional or recommended updates when a search for updates and installation of updates is performed.

Scheduled Day:

Days of the week on which Automatic Updates installs or uninstalls updates.

Scheduled Time:

Time at which Automatic Updates installs or uninstalls updates.

Return type:

dict

CLI Examples:

salt '*' win_wua.get_wu_settings
salt.modules.win_wua.install(names)#

New in version 2017.7.0.

Installs updates that match the list of identifiers. It may be easier to use the list_updates function and set install=True.

Parameters:

names (str, list) -- A single update or a list of updates to install. This can be any combination of GUIDs, KB numbers, or names. GUIDs or KBs are preferred.

Note

An error will be raised if there are more results than there are items in the names parameter

Returns:

A dictionary containing the details about the installed updates

Return type:

dict

CLI Examples:

# Normal Usage
salt '*' win_wua.install KB12323211
salt.modules.win_wua.installed(summary=False, kbs_only=False)#

New in version 3001.

Get a list of all updates that are currently installed on the system.

Note

This list may not necessarily match the Update History on the machine. This will only show the updates that apply to the current build of Windows. So, for example, the system may have shipped with Windows 10 Build 1607. That machine received updates to the 1607 build. Later the machine was upgraded to a newer feature release, 1803 for example. Then more updates were applied. This will only return the updates applied to the 1803 build and not those applied when the system was at the 1607 build.

Parameters:
  • summary (bool, optional) --

    Return a summary instead of a detailed list of updates. True will return a Summary, False will return a detailed list of installed updates.

    Default is False.

  • kbs_only (bool, optional) --

    Only return a list of KBs installed on the system. If this parameter is passed, the summary parameter will be ignored.

    Default is False.

Returns:

Returns a dictionary of either a Summary or a detailed list of

updates installed on the system when kbs_only=False

list:

Returns a list of KBs installed on the system when kbs_only=True

Return type:

dict

CLI Examples:

# Get a detailed list of all applicable updates installed on the system
salt '*' win_wua.installed

# Get a summary of all applicable updates installed on the system
salt '*' win_wua.installed summary=True

# Get a simple list of KBs installed on the system
salt '*' win_wua.installed kbs_only=True
salt.modules.win_wua.list(software=True, drivers=False, summary=False, skip_installed=True, categories=None, severities=None, download=False, install=False, online=True)#

New in version 2017.7.0.

Returns a detailed list of available updates or a summary. If download or install is True the same list will be downloaded and/or installed.

Parameters:
  • software (bool, optional) --

    Include software updates in the results.

    Default is True.

  • drivers (bool, optional) -- Include driver updates in the results. Default is False

  • summary (bool, optional) --

    • True: Return a summary of updates available for each category.

    • False (default): Return a detailed list of available updates.

    Default is False.

  • skip_installed (bool, optional) --

    Skip installed updates in the results.

    Default is True.

  • categories (list) --

    Specify the categories to list. Must be passed as a list. All categories returned by default.

    Categories include the following:

    • Critical Updates

    • Definition Updates

    • Drivers (make sure you set drivers=True)

    • Feature Packs

    • Security Updates

    • Update Rollups

    • Updates

    • Update Rollups

    • Windows 7

    • Windows 8.1

    • Windows 8.1 drivers

    • Windows 8.1 and later drivers

    • Windows Defender

    Default is None.

  • severities (list) --

    Specify the severities to include. Must be passed as a list. All severities returned by default.

    Severities include the following:

    • Critical

    • Important

    Default is None.

  • download (bool) --

    (Overrides reporting functionality) Download the list of updates returned by this function. Run this function first with download=False to see what will be downloaded, then set download=True to download the updates.

    Default is False.

  • install (bool) --

    (Overrides reporting functionality) Install the list of updates returned by this function. Run this function first with install=False to see what will be installed, then set install=True to install the updates.

    Default is False.

  • online (bool) --

    Tells the Windows Update Agent go online to update its local update database. True will go online. False will use the local update database as is.

    Default is True.

    New in version 3001.

Returns:

Returns a dict containing either a summary or a list of updates:

Dict of Updates:
{'<GUID>': {
    'Title': <title>,
    'KB': <KB>,
    'GUID': <the globally unique identifier for the update>,
    'Description': <description>,
    'Downloaded': <has the update been downloaded>,
    'Installed': <has the update been installed>,
    'Mandatory': <is the update mandatory>,
    'UserInput': <is user input required>,
    'EULAAccepted': <has the EULA been accepted>,
    'Severity': <update severity>,
    'NeedsReboot': <is the update installed and awaiting reboot>,
    'RebootBehavior': <will the update require a reboot>,
    'Categories': [
        '<category 1>',
        '<category 2>',
        ... ]
}}

Summary of Updates:
{'Total': <total number of updates returned>,
 'Available': <updates that are not downloaded or installed>,
 'Downloaded': <updates that are downloaded but not installed>,
 'Installed': <updates installed (usually 0 unless installed=True)>,
 'Categories': {
    <category 1>: <total for that category>,
    <category 2>: <total for category 2>,
    ... }
}

Return type:

dict

CLI Examples:

# Normal Usage (list all software updates)
salt '*' win_wua.list

# List all updates with categories of Critical Updates and Drivers
salt '*' win_wua.list categories='["Critical Updates","Drivers"]'

# List all Critical Security Updates
salt '*' win_wua.list categories='["Security Updates"]' severities='["Critical"]'

# List all updates with a severity of Critical
salt '*' win_wua.list severities='["Critical"]'

# A summary of all available updates
salt '*' win_wua.list summary=True

# A summary of all Feature Packs and Windows 8.1 Updates
salt '*' win_wua.list categories='["Feature Packs","Windows 8.1"]' summary=True
salt.modules.win_wua.reset(purge_old=False)#

New in version 3009.0.

Convenience function that resets both the Windows Update datastore (SoftwareDistribution) and the Windows Update catalog cache (catroot2) in a single pass. This stops the Windows Update related services once, performs both resets, and restarts the services once, which is more efficient than calling win_wua.reset_datastore and win_wua.reset_catroot separately.

Warning

This stops the Windows Update related services (interrupting any in-progress download/install) and renames -- or, with purge_old=True, permanently deletes -- both directories, including all cached update payloads and the local update history/metadata. This is a destructive troubleshooting action and should not be run routinely or included in a default highstate. purge_old=True is irreversible: no .old.<timestamp> copies are left behind to recover from.

Parameters:

purge_old (bool, optional) --

If True, deletes the existing directories instead of renaming them. This is irreversible.

Default is False

Returns:

A dictionary containing the results of both resets

{
    "reboot_pending": False,
    "SoftwareDistribution": {
        "old_path": "C:\Windows\SoftwareDistribution",
        "new_path": "C:\Windows\SoftwareDistribution.old.<ts>",
        "purged": False,
        "result": True,
    },
    "catroot2": {
        "old_path": "C:\Windows\System32\catroot2",
        "new_path": "C:\Windows\System32\catroot2.old.<ts>",
        "purged": False,
        "result": True,
    },
}

Return type:

dict

CLI Example:

salt '*' win_wua.reset
salt '*' win_wua.reset purge_old=True
salt.modules.win_wua.reset_catroot(purge_old=False)#

New in version 3009.0.

Resets the Windows Update catalog cache by stopping the Windows Update related services, renaming the catroot2 directory, and restarting the services. This is a common troubleshooting step for Windows Update issues (see the module-level note above for the full diagnostic workflow).

Warning

This stops the Windows Update related services (interrupting any in-progress download/install) and renames -- or, with purge_old=True, permanently deletes -- the catroot2 directory. This is a destructive troubleshooting action and should not be run routinely or included in a default highstate. purge_old=True is irreversible: no .old.<timestamp> copy is left behind to recover from.

Parameters:

purge_old (bool, optional) --

If True, deletes the existing catroot2 directory instead of renaming it. This is irreversible.

Default is False

Returns:

A dictionary containing the results of the reset

{
    "reboot_pending": False,
    "catroot2": {
        "old_path": "C:\Windows\System32\catroot2",
        "new_path": "C:\Windows\System32\catroot2.old.<ts>",
        "purged": False,
        "result": True,
    }
}

Return type:

dict

CLI Example:

salt '*' win_wua.reset_catroot
salt '*' win_wua.reset_catroot purge_old=True
salt.modules.win_wua.reset_datastore(purge_old=False)#

New in version 3009.0.

Resets the Windows Update datastore by stopping the Windows Update related services, renaming the SoftwareDistribution directory, and restarting the services. This is a common troubleshooting step for Windows Update issues, such as an update that reports success but does not persist (see the module-level note above for the full diagnostic workflow).

Warning

This stops the Windows Update related services (interrupting any in-progress download/install) and renames -- or, with purge_old=True, permanently deletes -- the SoftwareDistribution directory, including all cached update payloads and the local update history/metadata. This is a destructive troubleshooting action and should not be run routinely or included in a default highstate. purge_old=True is irreversible: no .old.<timestamp> copy is left behind to recover from.

Parameters:

purge_old (bool, optional) --

If True, deletes the existing SoftwareDistribution directory instead of renaming it. This is irreversible.

Default is False

Returns:

A dictionary containing the results of the reset

{
    "reboot_pending": False,
    "SoftwareDistribution": {
        "old_path": "C:\Windows\SoftwareDistribution",
        "new_path": "C:\Windows\SoftwareDistribution.old.<ts>",
        "purged": False,
        "result": True,
    }
}

Return type:

dict

CLI Example:

salt '*' win_wua.reset_datastore
salt '*' win_wua.reset_datastore purge_old=True
salt.modules.win_wua.set_wu_settings(level=None, recommended=None, featured=None, elevated=None, msupdate=None, day=None, time=None)#

Change Windows Update settings. If no parameters are passed, the current value will be returned.

Supported:
  • Windows Vista / Server 2008

  • Windows 7 / Server 2008R2

  • Windows 8 / Server 2012

  • Windows 8.1 / Server 2012R2

Parameters:
  • level (int, optional) --

    Number from 1 to 4 indicating the update level:

    1. Never check for updates

    2. Check for updates but let me choose whether to download and install them

    3. Download updates but let me choose whether to install them

    4. Install updates automatically

    Default is None.

  • recommended (bool, optional) --

    Boolean value that indicates whether to include optional or recommended updates when a search for updates and installation of updates is performed.

    Default is None.

  • featured (bool, optional) --

    Boolean value that indicates whether to display notifications for featured updates.

    Default is None.

  • elevated (bool, optional) --

    Boolean value that indicates whether non-administrators can perform some update-related actions without administrator approval.

    Default is None.

  • msupdate (bool, optional) --

    Boolean value that indicates whether to turn on Microsoft Update for other Microsoft products.

    Default is None.

  • day (str, optional) --

    Days of the week on which Automatic Updates installs or uninstalls updates. Accepted values:

    • Everyday

    • Monday

    • Tuesday

    • Wednesday

    • Thursday

    • Friday

    • Saturday

    Default is None.

  • time (str, optional) --

    Time at which Automatic Updates installs or uninstalls updates. Must be in the ##:## 24hr format, eg. 3:00 PM would be 15:00. Must be in 1 hour increments.

    Default is None.

Returns:

Returns a dictionary containing the results.

Return type:

dict

CLI Examples:

salt '*' win_wua.set_wu_settings level=4 recommended=True featured=False
salt.modules.win_wua.uninstall(names)#

New in version 2017.7.0.

Uninstall updates.

Parameters:

names (str, list) -- A single update or a list of updates to uninstall. This can be any combination of GUIDs, KB numbers, or names. GUIDs or KBs are preferred.

Returns:

A dictionary containing the details about the uninstalled updates

Return type:

dict

CLI Examples:

# Normal Usage
salt '*' win_wua.uninstall KB3121212

# As a list
salt '*' win_wua.uninstall guid=['12345678-abcd-1234-abcd-1234567890ab', 'KB1231231']