Jump to content


ingram59

BASIC SCCM 2012 Query not working

Recommended Posts

I'm trying to build a collection of computers containing specific naming conventions using the query below.....

 

 

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 like "%osit"

 

I use "All Systems" as the limiting collection (it has over 1,100 systems listed). When I build the collection, it returns 0 results. However when I run this query in WBEMTEST, it returns numerous entries. There are a small number of the OSIT named systems that have the client, but most don't

 

I've tried variations on this, using:

Is Like 'OSIT',

Is Like '%OSIT%'

Is Equal 'OSIT'

 

The SCCM query returns 0 results in all cases.

 

This is a NEW installation, We had a Microsoft consultant come out for a few days and all appears to be configured correctly. What am I missing? I've worked with SCCM 2003 and 2007 and have not run in to this issue with such a basic query.

 

Thanks in advance for your assistance.

Share this post


Link to post
Share on other sites

Strange, because your request look good.

Here is mine :

 

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 like "%PAR"

 

give me all Workstations from Paris....

 

If you look in table SMS_R_SYSTEM with sql management studio , is it ok ?

 

Share this post


Link to post
Share on other sites

Ran this by our consultant. He told me to use the 'netbios' instead of 'name' and it worked fine. What's puzzling is that I've ALWAYS used 'name' in the past and I've never had a problem.

In general, using name vs Netbiois_name will have zero affect on the results. It is easy to see, open the console find one of your computers and compare the name and NetBIOS name. in all but rare cases will they not match.

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
Reply to this topic...

×   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.