I would like to run a report that would list the count of computers in all my various Active Directy OUs. I see that the Filter Panel in the Consoles shows them that way. There is a Web Reports parameter that includes a “Active Directory Path”, but that includes the actual Computer Name, so it created a new line for every single computer and not the count I’m looking for.
Is there a way to display the computer count this way?
Try making a Custom Web Report with the following code:
Active Directory Path
OU
Number of computers
<?Relevance trs of (td of it & td of (multiplicity of it as string)) of unique values of (concatenation "." of substrings separated by ",DC=" of it as lowercase) of (following texts of lasts ",OU=" of ( values of results of bes property "Active Directory path"))?>
I am not sure if I parsed the active directory path properly, but try that out and see if it works.
I found that only returned the top level OUs. I changed the code as follows and it now reports every OU.
Thanks again for your help.
Active Directory Path
OU
Number of computers
<?Relevance trs of (td of it & td of (multiplicity of it as string)) of unique values of (following texts of firsts ",OU=" of (values of results of bes property "Active Directory path"))?>