Topic
2 replies Latest Post - ‏2012-05-08T15:03:27Z by SystemAdmin
SystemAdmin
SystemAdmin
890 Posts
ACCEPTED ANSWER

Pinned topic Active Directory Reporting

‏2012-05-07T17:09:58Z |
Hello,

I'm trying to write relevance to list out computers and an OU based on if another OU exists.

i.e.
CN=USAL0AUBURL001,OU=USAL0AUBUR,OU=USAL0,OU=ITS,OU=WKS Accounts,DC=ageast,DC=one,DC=xxx,DC=xxx
If "OU=WKS Accounts" exists then list out the OU right before it, in this case OU=ITS. I've looked at some of the existing posts on active directory but I haven't been able to get this correct yet.

I'd like to write this into an analysis but a custom report can work as well.

Any help or links would be much appreciated.

thanks,
Baraq
Console version 8.1.551.0 with DSS-SAM Version 1.3.1.597
Updated on 2012-05-08T15:03:27Z at 2012-05-08T15:03:27Z by SystemAdmin
  • MrFixit
    MrFixit
    20 Posts
    ACCEPTED ANSWER

    Re: Active Directory Reporting

    ‏2012-05-07T20:49:19Z  in response to SystemAdmin
    q: (if (exists distinguished name whose (it contains "OU=WKS Accounts") of it) then (following text of lasts ",OU=" of preceding text of first ",OU=WKS Accounts" of distinguished name of it) else nothing) of local computer of active directory

    Use caution with AD queries, they are expensive and can post a significant load on your DCs.
    • SystemAdmin
      SystemAdmin
      890 Posts
      ACCEPTED ANSWER

      Re: Active Directory Reporting

      ‏2012-05-08T15:03:27Z  in response to MrFixit
      Ok, so I was going in the complete wrong direction with this:) Thanks!!

      I'm guessing that running this against 50k machines wouldn't be a good idea then?

      -Baraq

      Console version 8.1.551.0 with DSS-SAM Version 1.3.1.597