locked
Capture computers per site/subnet RRS feed

  • Question

  • We are currently testing Windows Server TP4 out, and I'm trying to build an LDAP query to grab computers by site. I tried using these queries, but no luck 

    CN=10.2.0.0/22,CN=Subnets,CN=Sites,CN=Configuration,DC=root,DC=com
    &(&(objectClass=Computer)(objectCategory=Computer))

    CN=LondonSiteCN=Sites,CN=Configuration,DC=root,DC=com
    &(&(objectClass=Computer)(objectCategory=Computer))

    I'm not looking for a script in this case, so I want to know if this is possible through LDAP.


    • Edited by MommaDee15 Saturday, April 2, 2016 1:19 AM
    Saturday, April 2, 2016 1:18 AM

Answers

All replies

  • I'd look around here. You should be able to find something you can work with.

    https://gallery.technet.microsoft.com/scriptcenter

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Saturday, April 2, 2016 3:31 AM
  • Not looking for scripts to solve my issue, just looking to see if it's possible to do through an LDAP query
    Sunday, April 3, 2016 3:42 PM
  • Hi MommaDee,

    Based on my understanding, you are finding a script to use LDAP query to grab computers in specific site.

    As far as I know, it might be possible to use LDAP query. However, since this forum is more related with general questions about TP4, and your requirements needs basic knowledge about creating LDAP query filter.

    I could provide some information about how to create LDAP query filter:

    https://technet.microsoft.com/en-us/library/aa996205(v=exchg.65).aspx

    http://social.technet.microsoft.com/wiki/contents/articles/5392.active-directory-ldap-syntax-filters.aspx

    By the way, can you use these queries (mentioned in your original post) on pervious environment, such as 2012R2 lab? Or the issue is that you can use the queries on pervious server OS, while the queries doesn't work on TP4?

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Friday, April 8, 2016 8:51 AM