create collection for Windows 7 machines
Hi,, I am using SCCM 2007. I want to create an collection for windows 7 machines. I created on with below query it shows only 177 machines, where in AD when i search for windows 7 machines it shows around 400 machines. Please tell me if correct query is available. 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 where SMS_R_System.OperatingSystemNameandVersion like "%Workstation 6.1%" or SMS_R_System.OperatingSystemNameandVersion like "%Windows 7%" and SMS_G_System_COMPUTER_SYSTEM.SystemType = "x64-based PC"Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Thanks Chandru CT-HCL Thanks Chandru CT. MCITP
September 6th, 2012 5:12am

Hi, Can you see all 400 system in SCCM console. If not try please check and confirm AD discovery method is configured properly. If you can see all system in SCCM console. try to run this query 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_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption = "Microsoft Windows 7 Enterprise"Jho | " Please remember to mark as helpful/answer if this helped you"
Free Windows Admin Tool Kit Click here and download it now
September 6th, 2012 6:56am

Just copy the query used for one of the default OS collections and modify the version number to 6.1. Just because a resource is in AD does not mean its a valid resource that has been discovered by ConfigMgr. How are you searching AD for Win 7 systems?Jason | http://blog.configmgrftw.com
September 6th, 2012 8:36am

Are the missing systems x86 (32 bit) and/or are they not SCCM managed systems (no SCCM agent)? . Your query only includes Win7 systems that are 64-bit : >>>> (and SMS_G_System_COMPUTER_SYSTEM.SystemType = "x64-based PC"). Also, if the missing systems are not managed (no SCCM agent), they probably won't have a record in SMS_G_System_COMPUTER_SYSTEM. . My Win7 systems' OperatingSystemNameandVersion field does not display "Windows 7"... It only shows "Microsoft Windows NT Workstation 6.1". Perhaps the statement (or SMS_R_System.OperatingSystemNameandVersion like "%Windows 7%") has no effect. . As Jason suggested, try using the same query as the built-in. This should return all Windows 7 systems, regardless of whether they are 32 or 64bit (even if the agent is not installed). select * from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion LIKE "%Workstation 6.1%" . If you only want Win7 64bit (only includes managed systems): select * from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_R_System.OperatingSystemNameandVersion LIKE "%Workstation 6.1%" and SMS_G_System_COMPUTER_SYSTEM.SystemType = "x64-based PC" . I don't have Win7 x86, so I can't test the query... . I'm a bit new to SCCM, so I could be wrong... Best intention.
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2012 1:25pm

try this. 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 where OperatingSystemNameandVersion like '%Workstation 6.1%'
September 20th, 2012 6:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics