jellekamma
New Member
- Messages
- 1
- Reaction score
- 0
- Points
- 1
I am migrating from a standalone WSUS server to SCCM Software updates. I can see the updates in software center and install them just fine. However, I want to be able to install the updates manually via powershell.
I found this command to install all available updates: ([wmiclass]'ROOT\ccm\ClientSDK:CCM_SoftwareUpdatesManager').InstallUpdates([System.Management.ManagementObject[]] (get-wmiobject -query 'SELECT * FROM CCM_SoftwareUpdate' -namespace 'ROOT\ccm\ClientSDK'))
this prompts me with an error:
Exception calling "InstallUpdates" : ""
At line:1 char:1
+ ([wmiclass]'ROOT\ccm\ClientSDK:CCM_SoftwareUpdatesManager').InstallUp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified:
) [], MethodInvocationException
+ FullyQualifiedErrorId : WMIMethodException
If I run: get-wmiobject -query 'SELECT * FROM CCM_SoftwareUpdate' -namespace 'ROOT\ccm\ClientSDK' I can see all the updates. SO my question is, how do I install them via powershell?
I found this command to install all available updates: ([wmiclass]'ROOT\ccm\ClientSDK:CCM_SoftwareUpdatesManager').InstallUpdates([System.Management.ManagementObject[]] (get-wmiobject -query 'SELECT * FROM CCM_SoftwareUpdate' -namespace 'ROOT\ccm\ClientSDK'))
this prompts me with an error:
Exception calling "InstallUpdates" : ""
At line:1 char:1
+ ([wmiclass]'ROOT\ccm\ClientSDK:CCM_SoftwareUpdatesManager').InstallUp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified:

+ FullyQualifiedErrorId : WMIMethodException
If I run: get-wmiobject -query 'SELECT * FROM CCM_SoftwareUpdate' -namespace 'ROOT\ccm\ClientSDK' I can see all the updates. SO my question is, how do I install them via powershell?