On Windows 10 and Server 2016 DataCenter, there seems to be a problem with CIM class MSFT_WUOperationsSession in namespace root/Microsoft/Windows/WindowsUpdate
Lack of implementation prevents programmatic control of windows updates through CIM/WMI, particularly remote control over WinRM/WSMan.
There is a COM object for the Windows Update Agent, but it doesn't support remote execution. Implementing over WinRM/WSMan would improve control of resources from a centralized or remote location.
On Windows 10 and Server 2016 DataCenter, there seems to be a problem with CIM class
MSFT_WUOperationsSession
in namespaceroot/Microsoft/Windows/WindowsUpdate
Expected Behavior
It seems that the class was properly implemented in server Nano: https://blogs.technet.microsoft.com/nanoserver/2016/01/16/updating-nano-server-using-windows-update-or-windows-server-update-service/
Following the outlined instructions, I would expect to be able to search for and apply updates on any Windows 10/Server 2016 based operating system.
Current Behavior
This command:
$sess = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession
Returns this error:
However, the class and all of its methods are listed using:
Get-CimClass -Namespace root/Microsoft/Windows/WindowsUpdate
and
Get-CimClass -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession | select -ExpandProperty CimClassMethods
Possible Solution
Complete or update implementation of MSFT_WUOperationsSession for Windows 10 and Server 2016.
Steps to Reproduce
$sess = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession
Get-CimClass -Namespace root/Microsoft/Windows/WindowsUpdate
Get-CimClass -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession | select -ExpandProperty CimClassMethods
Context (Environment)
Lack of implementation prevents programmatic control of windows updates through CIM/WMI, particularly remote control over WinRM/WSMan.
There is a COM object for the Windows Update Agent, but it doesn't support remote execution. Implementing over WinRM/WSMan would improve control of resources from a centralized or remote location.