Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sample PowerShell functions for working with the ROOT\ccm\ClientSDK WMI namespace. For more info, see the related article on blog.powershell.no.
function Get-CMMissingUpdate {
param (
$computer = "localhost"
)
Get-WmiObject -Query "SELECT * FROM CCM_SoftwareUpdate" -Namespace "ROOT\ccm\ClientSDK" -ComputerName $computer
}
function Install-CMMissingUpdate {
param (
$computer = "localhost"
)
([wmiclass]'ROOT\ccm\ClientSDK:CCM_SoftwareUpdatesManager').InstallUpdates([System.Management.ManagementObject[]] (
Get-WmiObject -Query 'SELECT * FROM CCM_SoftwareUpdate' -namespace 'ROOT\ccm\ClientSDK'))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment