The “root/microsoft/windows/windowsupdate” namespace exists on my machine but does not on some servers.
My Machine (windows 10 version 1607, PSversion 5.1.14393.2125):
PS>get-cimclass MSFT_WUOperationsSession -Namespace root/Microsoft/Windows/WindowsUpdate NameSpace: ROOT/Microsoft/Windows/WindowsUpdate CimClassName CimClassMethods CimClassProperties ------------ --------------- ------------------ MSFT_WUOperationsSession {SetCallerID, App... {InstanceID}
Server (Windows Server 2008 standard, PSVersion 3.0):
PS C:\Windows\system32> get-cimclass MSFT_WUOperationsSession -Namespace root/Microsoft/Windows/WindowsUpdate get-cimclass : Invalid namespace + CategoryInfo : MetadataError: (root/Microsoft/...erationsSession:String) [Get-CimClass], CimException + FullyQualifiedErrorId : HRESULT 0x8004100e,Microsoft.Management.Infrastructure.CimCmdlets.GetCimClassCommand
Server (Windows Server 2012 R2 Standard, PSVersion 4.0):
PS C:\Users\cce0_\Documents> get-cimclass MSFT_WUOperationsSession -Namespace root/Microsoft/Windows/WindowsUpdate get-cimclass : Invalid namespace + CategoryInfo : MetadataError: (root/Microsoft/...erationsSession:String) [Get-CimClass], CimException + FullyQualifiedErrorId : HRESULT 0x8004100e,Microsoft.Management.Infrastructure.CimCmdlets.GetCimClassCommand
Does this namespace not exist on server operating systems or does this namespace come with a newer version of PowerShell(maybe 5.0)? The purpose of this information is to use methods in the the MSFT_WUOperationsSession class to get info on pending windows updates remotely, which works very well on my machine and other windows 10 computers I’ve tested it on.
My apologies if this is the incorrect place to be asking such as question, it’s more of a ‘why does this namespace not exist here’ instead of a specific powershell question, unless the reasoning is the new version of powershell (hopefully that is the case here).