PSWindowsUpdate
PSWindowsUpdate copied to clipboard
Search for optional updates only
The Parameter -DeploymentAction should not only accept "Installation;Uninstallation" but all possible values. The possible values are defined here: https://learn.microsoft.com/en-us/windows/win32/api/wuapi/ne-wuapi-deploymentaction
0 = None
1 = Installation
2 = Uninstallation
3 = Detection
4 = OptionalInstallation
Example:
Get-WindowsUpdate -DeploymentAction OptionalInsatallation -ShowPreSearchCriteria -Verbose