locked
Collections missing random devices RRS feed

  • Question

  • Hi all,

    I'm in the middle of configuring a 2012 R2 CU3 server and having a problem with collections not populating correctly.

    It may be important to note that at this stage I have not deployed any clients yet.

    So I have the All Systems list which is targeting a number of OU's and seems to have the correct amount of devices in the list.

    From there I have 2 collections based on IP address ranges so I can separate the devices in the OU structure. The problem I am having is that about 10% of the devices do not end up in these collections and are just orphaned, but oddly it's random machines in the ranges I specify.

    For example here's a class C:

    System Resource - IP addresses

    Greater or equal to 10.14.216.11 AND Less than or equal to 10.14.216.254

    Limiting Collection: All Systems

    10.14.216.11 - added to collection

    10.14.216.12 - not added to the collection, just listed in All Systems

    10.14.216.13 - added to collection

    10.14.216.14 - added to collection

    Deleted machines, re-added them. I even ran an SQL query on the SCCM DB and it sees these IP addresses. When I look at one of these machines properties I can see the IP address listed.

    Any ideas guys?

     




    • Edited by Peter Lay Tuesday, November 29, 2016 12:38 AM
    Tuesday, November 29, 2016 12:21 AM

Answers

  • I think the less than or equal to is for a number, not a string. Which might be why some machines aren't appearing. 
    Tuesday, November 29, 2016 12:51 AM
  • Nick is correct, these are IPs and not numbers, and that query will miss some of them.

    You can try using either a subnet, like where SMS_R_System.IPSubnets = "10.14.216.0" or partial IP match like where SMS_R_System.IPAddresses like "10.14.216.%"

    My personal preference though is to use something other than IP addresses if possible (AD Site, Computer Name, etc..). I tend to avoid using IPs as a criteria unless that is absolutely necessary.
    • Marked as answer by Peter Lay Tuesday, November 29, 2016 11:28 PM
    Tuesday, November 29, 2016 2:48 AM
  • As a note to Nick's correct answer, "10.14.216.11" is not a number so there is no direct way to compare it to 10.14.216.11 (which also isn't a number) as a number. You can certainly use of Emanuel's suggestions though -- it depends upon exactly what you are trying to accomplish though.

    As an additional note, you should install SP1 and SP1 CU4 to get up to the latest version of ConfigMgr 2012 or even upgrade to Current Branch.


    Jason | http://blog.configmgrftw.com | @jasonsandys

    Tuesday, November 29, 2016 3:18 AM
  • Hi all,

    I managed to resolve the issue by changing the query slightly. For those of you interested I started by using SQL queries on the DB directly via SQL management studio. Once I worked out what I needed it was easy enough to make a query in SCCM itself. Thanks to Nick for pointing me in the right direction.

    The SQL query I used for example (formatting is weird on this forum apologies if it comes out odd):

    SELECT
    IP.ResourceID,
    S.Name0 As'Name',
    IP.IP_Addresses0 As'IP Addresses'
    FROM
    v_RA_System_IPAddresses IP
    INNER JOINv_R_System S
    ON
    IP.ResourceID =S.ResourceID
    WHERE
    IP.IP_Addresses0 like'%10.233.240%'orIP.IP_Addresses0 like'%10.233.228%'

    Basically I ended up with 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 SMS_R_System.IPAddresses like "%10.233.240.%" or SMS_R_System.IPAddresses like "%10.233.228.%"

    Not an ideal way to stick a collection together, but sometimes you are left with few options.

    Tuesday, November 29, 2016 11:20 PM

All replies

  • I think the less than or equal to is for a number, not a string. Which might be why some machines aren't appearing. 
    Tuesday, November 29, 2016 12:51 AM
  • Thanks any solution?

    Tuesday, November 29, 2016 1:03 AM
  • Nick is correct, these are IPs and not numbers, and that query will miss some of them.

    You can try using either a subnet, like where SMS_R_System.IPSubnets = "10.14.216.0" or partial IP match like where SMS_R_System.IPAddresses like "10.14.216.%"

    My personal preference though is to use something other than IP addresses if possible (AD Site, Computer Name, etc..). I tend to avoid using IPs as a criteria unless that is absolutely necessary.
    • Marked as answer by Peter Lay Tuesday, November 29, 2016 11:28 PM
    Tuesday, November 29, 2016 2:48 AM
  • As a note to Nick's correct answer, "10.14.216.11" is not a number so there is no direct way to compare it to 10.14.216.11 (which also isn't a number) as a number. You can certainly use of Emanuel's suggestions though -- it depends upon exactly what you are trying to accomplish though.

    As an additional note, you should install SP1 and SP1 CU4 to get up to the latest version of ConfigMgr 2012 or even upgrade to Current Branch.


    Jason | http://blog.configmgrftw.com | @jasonsandys

    Tuesday, November 29, 2016 3:18 AM
  • Hi all,

    I managed to resolve the issue by changing the query slightly. For those of you interested I started by using SQL queries on the DB directly via SQL management studio. Once I worked out what I needed it was easy enough to make a query in SCCM itself. Thanks to Nick for pointing me in the right direction.

    The SQL query I used for example (formatting is weird on this forum apologies if it comes out odd):

    SELECT
    IP.ResourceID,
    S.Name0 As'Name',
    IP.IP_Addresses0 As'IP Addresses'
    FROM
    v_RA_System_IPAddresses IP
    INNER JOINv_R_System S
    ON
    IP.ResourceID =S.ResourceID
    WHERE
    IP.IP_Addresses0 like'%10.233.240%'orIP.IP_Addresses0 like'%10.233.228%'

    Basically I ended up with 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 SMS_R_System.IPAddresses like "%10.233.240.%" or SMS_R_System.IPAddresses like "%10.233.228.%"

    Not an ideal way to stick a collection together, but sometimes you are left with few options.

    Tuesday, November 29, 2016 11:20 PM
  • Completely agree on what you are saying, but it's one of those situations where I have inherited infrastructure that needs an overhaul.

    Flat OU structure, Prod machines mixed with non-prod, terrible machine naming convention, missing subnets from AD S&S and of course our old friend Mr.Politics. I could go on....

    This is a stop-gap until I can get around to resolving the core issues. Thanks for the advice though.

    Tuesday, November 29, 2016 11:23 PM
  • As a note to Nick's correct answer, "10.14.216.11" is not a number so there is no direct way to compare it to 10.14.216.11 (which also isn't a number) as a number. You can certainly use of Emanuel's suggestions though -- it depends upon exactly what you are trying to accomplish though.

    As an additional note, you should install SP1 and SP1 CU4 to get up to the latest version of ConfigMgr 2012 or even upgrade to Current Branch.


    Jason | http://blog.configmgrftw.com | @jasonsandys

    Apologies, I forgot to add it's 2012 R2 SP1 however I thought CU3 was the latest according to the web. It's rather confusing with the way the service pack has been released for 2012 and 2012 R2. I'll be doing a migration to current branch in June/July as AD's current functional level is still 2003 and have to wait for another team to raise it (probably March) therefore unsupported.

    • Edited by Peter Lay Tuesday, November 29, 2016 11:27 PM
    Tuesday, November 29, 2016 11:27 PM
  • You don't really have to wait as there truly is no difference from a ConfigMgr perspective. The reason it's unsupported is because anything and everything Windows Server 2003 is unsupported since its past EOL. I would not wait to go to CB because of this.

    2012 SP2/2012 R2 SP1 CU4 was released quite recently, like 3 (maybe 4) weeks ago I think.


    Jason | http://blog.configmgrftw.com | @jasonsandys

    Wednesday, November 30, 2016 2:21 AM