WMI Query to Check Policy Arrived on Client Machines (SCCM)

Whenever any policy arrives on the system, it saves in the WMI.

WMI of the system can be accessed using Wbemtest (with admin rights).

For Machine Policy (i.e. Advertisement Targeted on Machine)

We have to type:

Root\ccm\Policy\machine\RequestedConfig

Then, click on Query, and type the following query:

Select * from ccm_policy_policy4 where policyid like ā€˜%ABC2374Cā€™

(Where ccm_policy_policy4 is the object which contains all the policies, and ABC2374C is the advertisement ID we are searching for).

Then click Show you mof details with PolicyID, PolicySource, PolicyType, PolicyVersion

This indicates the policy version downloaded, if the policy is active or not, machine or user policy. This is the best way to check if the policy has arrived or not.

What happens when the policy is targeted to users?

For User Policy (i.e advertisement targeted on user/security group)

We have to type:

Root\ccm\Policy\S_1_5_21_220523388_1085031214_725345543_1905905\RequestedConfig

Where S_1_5_21_220523388_1085031214_725345543_1905905 is SID of the user logged-on, rest of the process is same as specified above for machine policy.

Note:
To check the SID of any user, you can use the tool psgetsid.exe

http://c.statcounter.com/9828607/0/2fac327f/0/