I'm trying to write relevance to list out computers and an OU based on if another OU exists.
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.
Console version 8.1.551.0 with DSS-SAM Version 18.104.22.1687
This topic has been locked.
Pinned topic Active Directory Reporting
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
MrFixit 270004352S20 Posts
Re: Active Directory Reporting2012-05-07T20:49:19ZThis is the accepted answer. This is the accepted answer.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 110000D4XK890 Posts
Re: Active Directory Reporting2012-05-08T15:03:27ZThis is the accepted answer. This is the accepted answer.