Get all Workstations with Windows 7 and OS is 32-bit or 64-bit (WQL)

Purpose: Get all Workstations with Windows 7 x86 or x64 (WQL)

You might need to do certain procedures to a limited list of operating systems. In this example we will gather all workstations with Windows 7 operating system and separate them into two different collections depending on if the operating system is x86 or x64.

 

All Workstations with Windows 7 (x86)
Limiting collection: All Systems / All Systems (with Client)
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_PROCESSOR on SMS_G_System_PROCESSOR.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_PROCESSOR.AddressWidth = 32 and SMS_G_System_OPERATING_SYSTEM.Caption like “Microsoft Windows 7%”
All Workstations with Windows 7 (x64)
Limiting collection: All Systems / All Systems (with Client)
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_PROCESSOR on SMS_G_System_PROCESSOR.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_PROCESSOR.AddressWidth = 64 and SMS_G_System_OPERATING_SYSTEM.Caption like “Microsoft Windows 7%”

Leave a Reply

Your email address will not be published. Required fields are marked *


two + = three

Post Navigation