Jump to content


  • 0
TechGuy83

Collections not showing all machines, missing about 125

Question

This has me so confused I have 3 collections, they are going to be used to deploy software so I need to be confident they are correct.

 

My 3 collections are as follows:

 

All Workstations

select SMS_R_SYSTEM.Name from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Workstation%

 

All Windows 7 Workstations

select SMS_R_System.Name from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.OperatingSystemNameandVersion like "%Workstation%6.1%"

 

All Windows XP Workstations

select SMS_R_System.Name from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.OperatingSystemNameandVersion like "%Workstation%5.1%"

 

Adding Windows 7 and Windows XP collections together didn't give the number of workstations in the all workstations group, so I created this query to see what machines were missing:

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 SMS_R_System.Name in (select SMS_R_SYSTEM.Name from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Workstation%") and SMS_R_System.Name not in (select SMS_R_System.Name from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.OperatingSystemNameandVersion like "%Workstation%5.1%") and SMS_R_System.Name not in (select SMS_R_SYSTEM.Name from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_R_System.OperatingSystemNameandVersion like "%Workstation%6.1%")

 

It shows I have 125 not in the collection of XP or 7 looking at the properties on the 125 most of them are tablet edition of XP but however the statement I am using is like and has a percent after the 5.1 so should capture it?? In fact it does but only when using %Workstation%. How weird anyone seen anything like this before? Am I missing something obvious?

 

Clients are installed and working ok.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Just a hint. You don't have to join the queries to get this result. Just create 2 queries in your collection holding the original query of one collection. This will help you to avoid unexpected results, especially if you have already advertisments applied to the colection.

Share this post


Link to post
Share on other sites

  • 0

Well, you have already the deafult collections for Windows 7 and for Windows XP. So instead of joining the 2 queries in your new collection (XP+7) go to the membership rules of this collection and create 2 new queries. You don't have to edit the query statements of these queries. Just limit them to the Windows 7 and Windows XP collections.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.