sub ScheduleUpdateScan { my $Host = shift; my $SoftwareUpdateScan = "{00000000-0000-0000-0000-000000000113}"; my $CCM = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate,authenticationLevel=pktPrivacy}//$Host\\root\\ccm:sms_client") or warn Win32::OLE->LastError() and return 0; $CCM->TriggerSchedule($SoftwareUpdateScan) or warn Win32::OLE->LastError() and return 0; return 1; }