Here are some tips on how to execute SCCM agent actions without using the SCCM Agent GUI.
First a list of all the actions and the ScheduleID associated with the actions.
Application Global Evaluation Task {00000000-0000-0000-0000-000000000123}
MSI Product Source Update Cycle {00000000-0000-0000-0000-000000000107}
Hardware inventory {00000000-0000-0000-0000-000000000001}
Hardware inventory {00000000-0000-0000-0000-000000000001}
Software inventory {00000000-0000-0000-0000-000000000002}
Data Discovery Report {00000000-0000-0000-0000-000000000003}
File Collection {00000000-0000-0000-0000-000000000010}
Machine Policy Retrieval & Evaluation {00000000-0000-0000-0000-000000000021}
Machine policy evaluation {00000000-0000-0000-0000-000000000022}
Refresh default MP {00000000-0000-0000-0000-000000000023}
Refresh location services {00000000-0000-0000-0000-000000000024}
Request timeout value for tasks {00000000-0000-0000-0000-000000000025}
Request user assignments {00000000-0000-0000-0000-000000000026}
Evaluate user policies {00000000-0000-0000-0000-000000000027}
Software metering usage reporting {00000000-0000-0000-0000-000000000031}
Request software update source {00000000-0000-0000-0000-000000000032}
Refresh proxy manamgement point {00000000-0000-0000-0000-000000000037}
Cleanup policy {00000000-0000-0000-0000-000000000040}
Validate assignments {00000000-0000-0000-0000-000000000042}
Certificate maintenance {00000000-0000-0000-0000-000000000051}
DP: Peer DP status report {00000000-0000-0000-0000-000000000061}
DP: Peer DP pending status check {00000000-0000-0000-0000-000000000062}
Evaluate software update assignment {00000000-0000-0000-0000-000000000108}
State message upload {00000000-0000-0000-0000-000000000111}
Clean state message cache {00000000-0000-0000-0000-000000000112}
Sofware update scan {00000000-0000-0000-0000-000000000113}
Software update deployment re-eval {00000000-0000-0000-0000-000000000114}
Out-Of-Band management scheduled event {00000000-0000-0000-0000-000000000120}
The actions can be remotely executed on a client by using the following syntax
Note: Change the variables in Bold
VBS
Schid = “<SCHEDULEID>” sMachine = “<COMPUTERNAME>” Set WMItarget = GetObject(“winmgmts://” & sMachine) Set WMICCM=GetObject(“Winmgmts:{impersonationLevel=impersonate,authenticationLevel=pktPrivacy}!\\” & sMachine & “\root\ccm”) set SMSCli = WMICCM.Get(“SMS_Client”) set oParams = SMSCli.Methods_(“TriggerSchedule”).inParameters.SpawnInstance_() oParams.sScheduleID = Schid set res = WMICCM.ExecMethod(“SMS_Client”, “TriggerSchedule”, oParams)
Powershell
$ComputerName = “<COMPUTERNAME>” $ScheduleID = “<SCHEDULEID>”
$SmsClient = [wmiclass]”\\$ComputerName\root\ccm:SMS_Client”
$SmsClient.TriggerSchedule($ScheduleID)
WMIC
WMIC /Node:<COMPUTERNAME> /namespace:\\root\ccm path sms_client CALL TriggerSchedule “<SCHEDULEID>” /NOINTERACTIVE