That code doesn't even take into account the $Computer
parameter. I've updated the code to use the computer name parameter.
function Install-MissingUpdate {
[CmdletBinding()]
param (
$ComputerName = "Remote-Computer"
)
$UpdateList = [ManagementObject[]](Get-WmiObject -ComputerName $ComputerName -Query 'SELECT * FROM CCM_SoftwareUpdate' -Namespace ROOT\ccm\ClientSDK);
([wmiclass]"\\$ComputerName\ROOT\ccm\ClientSDK:CCM_SoftwareUpdatesManager").InstallUpdates($UpdateList);
}