Monday, May 14, 2012

Creating a list of Machines capable of power management for SCCM 2007 R3

Over on Technet there is an article stating that to create collection of machines capable of power management you should use the following query
select SMS_R_System.Name, SMS_R_System.OperatingSystemNameandVersion
from  SMS_R_System
inner join SMS_G_System_POWER_MANAGEMENT_CAPABILITIES
on SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.ResourceID = SMS_R_System.ResourceId
where (SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.RtcWake = "PowerSystemHibernate"
or SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.RtcWake = "PowerSystemSleeping3"
or SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.RtcWake = "PowerSystemShutdown")
and SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.SystemS3 = 1
and SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.PreferredPMProfile != 2
order by SMS_R_System.Name DESC
I believe there might be a problem in that query..
 SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.PreferredPMProfile != 2
I think refers to the 'preferred power management profile' that is set by the OEM when creating the machine. See here for more info. By using the above query you are actually excluding all mobile type devices (laptops)

The proper query should be

select SMS_R_System.Name, SMS_R_System.OperatingSystemNameandVersion
from  SMS_R_System
inner join SMS_G_System_POWER_MANAGEMENT_CAPABILITIES
on SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.ResourceID = SMS_R_System.ResourceId
where (SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.RtcWake = "PowerSystemHibernate"
or SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.RtcWake = "PowerSystemSleeping3"
or SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.RtcWake = "PowerSystemShutdown")
and SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.SystemS3 = 1
order by SMS_R_System.Name DESC
Bonus query for today.. All computer not capable of power management
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_POWER_MANAGEMENT_CAPABILITIES on SMS_G_System_POWER_MANAGEMENT_CAPABILITIES.ResourceID = SMS_R_System.ResourceId   where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation %" and SMS_G_System_POWER_MANAGEMENT_CAPABILITIES. SystemS3 <> 1 
If you find this article useful please leave me a comment or click on an ad to show your support.

No comments :

Post a comment