Looking for a way of deploying and updating the SCCM SP2 client to old clients? Well, here is the collection I’ve been using. This will list all the clients that are not running Service Pack 2.
select SMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SMS_ADVANCED_CLIENT_STATE on SMS_G_System_SMS_ADVANCED_CLIENT_STATE.ResourceID = SMS_R_System.ResourceId where SMS_R_System.ClientType = 1 and SMS_G_System_SMS_ADVANCED_CLIENT_STATE.Name = “CcmFramework” and SMS_G_System_SMS_ADVANCED_CLIENT_STATE.Version < “4.0.6487.2000”