Professional Documents
Culture Documents
Basic "OS Architecture" Queries (returns All Systems for specified architecture):
select distinct
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_COMPUTER_SYSTEM on
SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceID
where
SMS_G_System_COMPUTER_SYSTEM.SystemType = "x86-based PC"
select distinct
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_COMPUTER_SYSTEM on
SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceID
where
SMS_G_System_COMPUTER_SYSTEM.SystemType = "X64-based PC"
select distinct
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_COMPUTER_SYSTEM on
SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceID
inner join
SMS_G_System_OPERATING_SYSTEM on
SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceID
where
SMS_G_System_COMPUTER_SYSTEM.SystemType = "x86-based PC" and
SMS_G_System_OPERATING_SYSTEM.Caption not like "%Server%"
http://www.acupofit.com/2014/05/sccm-wql-query-dealing-with-x86-and-x64.html[7/7/2015 18:40:37]
A Cup of IT: SCCM WQL Query: Dealing with X86 and X64 Systems
select distinct
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_COMPUTER_SYSTEM on
SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceID
inner join
SMS_G_System_OPERATING_SYSTEM on
SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceID
where
SMS_G_System_COMPUTER_SYSTEM.SystemType = "x64-based PC" and
SMS_G_System_OPERATING_SYSTEM.Caption like "%Server%"
select distinct
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_COMPUTER_SYSTEM on
SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceID
inner join
SMS_G_System_OPERATING_SYSTEM on
SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceID
where
SMS_G_System_COMPUTER_SYSTEM.SystemType = "x86-based PC" and
SMS_G_System_OPERATING_SYSTEM.Caption like "%Windows 7%"
In the above code just specify desired OS Architecture for
"SMS_G_System_COMPUTER_SYSTEM.SystemType" and substitute desired OS version for
"SMS_G_System_OPERATING_SYSTEM.Caption". For example:
Hope you guys find this useful, and if anyone knows a betetr method feedback is always welcome.
Posted by
ZeusABJ
at
3:50 PM
http://www.acupofit.com/2014/05/sccm-wql-query-dealing-with-x86-and-x64.html[7/7/2015 18:40:37]