Home » Microsoft » Query to Determine 32 or 64 bit Operating System

sql-server
In many cases there are a need create a collection with either all Windows 7 – x86 or all Windows 7 x64 installed.This can be used for targeting only a specific platform with an update or a program.

I do this by querying the SCCM inventory, SMS_G_System_COMPUTER_SYSTEM.SystemType which returns “x64-based PC”or “X86-based PC”.

Query to find all Windows 7 – x64

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_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 “Microsoft Windows 7%”

And the query for Windows 7 -x86

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_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 “Microsoft Windows 7%”

Comments

comments

Latest

dictate Microsoft Announces Dictation Software for Office
outlook for mac Outlook 2016 for Mac Gets Huge Update
power bank How to Choose the Best Type of Power Bank for You
6 Garage Band Alternatives For Music Production On Windows Devices
Tech Geek Weekly: June 16, 2017

Follow Us

Visit Us On TwitterVisit Us On FacebookVisit Us On GooglePlusVisit Us On PinterestVisit Us On YoutubeCheck Our Feed

Join Premium

Enjoy All The Benefits Of Premium

  • Access To Premium Content Only Available To Members
  • Digital Copy Of My Book The Pangram Killer
  • Coupons for quality sites affiliated with us
  • Access To All Short Stories
  • Free Plug On Podcast
  • Get first notice and exclusive access to events and meetups
$19.99

Subscribe To The Technology Geek

Archives