2008-12-31

Control SCCM client actions by scripting

The Advanced Client, is scriptable. You can use the CPApplet locally on the client or you can use WMI to do things remotely. On thing you'll often need is the triggering of an action. There are loads of samples in this forum meanwhile how to do it. Here is an overview of the actions available and their respective ScheduledMessageIDs which you will need to trigger them remotely.
(From http://www.myitforum.com/articles/8/view.asp?id=6757)
Hardware Inventory Cycle
CPApplet Name: Hardware Inventory Collection Cycle
ScheduledMessageID: {00000000-0000-0000-0000-00000001}

Software Inventory Cycle
CPApplet Name: Software Inventory Collection Cycle
ScheduledMessageID: {00000000-0000-0000-0000-00000002}

Discovery Data Collection Cycle
CPApplet Name: Discovery Data Collection Cycle
ScheduledMessageID: {00000000-0000-0000-0000-00000003}

File Collection Cycle
CPApplet Name: Standard File Collection Cycle
ScheduledMessageID: {00000000-0000-0000-0000-00000010}

ID MIF Collection Cycle
CPApplet Name: Standard File Collection Cycle
ScheduledMessageID: {00000000-0000-0000-0000-00000011}

Machine Policy Retrieval & Evaluation Cycle
CPApplet Name: Request & Evaluate Machine Policy
ScheduledMessageID: {00000000-0000-0000-0000-00000021} RequestAssignments Resource Type=’Machine’
ScheduledMessageID: {00000000-0000-0000-0000-00000022} Evaluate Policy Resource Type=’Machine’
The Machine Policy Retrieval & Evaluation Cycle consists of these two actions! There are two more Scheduled Messages in this context with no corresponding Client Actions.
ScheduledMessageID: {00000000-0000-0000-0000-00000040} CleanupPolicy Resource Type=’Machine’
ScheduledMessageID: {00000000-0000-0000-0000-00000042} ValidateAssignments Resource Type=’Machine’

User Policy Retrieval & Evaluation Cycle
CPApplet Name: Request & Evaluate User Policy
ScheduledMessageID: {00000000-0000-0000-0000-00000026} RequestAssignments Resource Type=’User’
ScheduledMessageID: {00000000-0000-0000-0000-00000027} Evaluate Policy Resource Type=’User’
The User Policy Retrieval & Evaluation Cycle consists of these two actions! There are two more Scheduled Messages in this context.
ScheduledMessageID: {00000000-0000-0000-0000-00000041} CleanupPolicy Resource Type=’User’
ScheduledMessageID: {00000000-0000-0000-0000-00000043} ValidateAssignments Resource Type=’User’

Software Metering Usage Report Cycle
CPApplet Name: Software Metering Usage Report Cycle
ScheduledMessageID: {00000000-0000-0000-0000-00000031}

Windows Installer Source List Update Cycle
CPApplet Name: MSI Product Source Update Cycle
ScheduledMessageID: {00000000-0000-0000-0000-00000032}

There are a few Scheduled Messages that do not correspond to Client Actions that can be triggered via the GUI.

Refresh default MP
ScheduledMessageID: {00000000-0000-0000-0000-00000023} LSRefreshDefaultMPTask

Refresh Location
ScheduledMessageID: {00000000-0000-0000-0000-00000024} LSRefreshLocationsTask

Timeout Location Service Requests
ScheduledMessageID: {00000000-0000-0000-0000-00000025} LSTimeOutRequestsTask

Manage Certificates
ScheduledMessageID: {00000000-0000-0000-0000-00000051} CertMaintenance

No comments: