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"OS Architecture Queries filtered by OS Type (Client/Server):
Note how we look for any systems that are NOT servers to get our list of clients.
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%"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%"OS Architecture Queries filtered by OS Version:
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:
- Use "%2000%" for Windows 2000
- Use "%Windows XP%" for Windows XP
- Use "%Server 2003%" for Windows 2003
- Use "%Vista%" for Windows Vista
- Use "%Serverr 2008%" for Windows 2008 Non-R2 (No, the extra "r" is not a typo)
- Use "%Windows 7%" for Windows 7
- Use "%Server 2008 R2%" for Windows Server 2008 R2
- Use "%Windows 8%" for Windows 8
- Use "%Server 2012%" for Windows 2012
Hope you guys find this useful, and if anyone knows a better method feedback is always welcome.