SMSUG.ca

...your virtual communITy
Welcome to SMSUG.ca Sign in | Join | Help
in Search

Garth Jones

Count of PC within each OU

For more detail about this query, please see

http://www.windows-noob.com/forums/index.php?/topic/9069-report-count-of-computers-in-certain-organizational-units/

select
    ou.ou,
    count(*) as 'total'
from
    (SELECT sys.ResourceID, max(OU.System_OU_Name0) AS 'OU' FROM dbo.v_R_System AS sys INNER JOIN dbo.v_RA_System_SystemOUName AS ou ON sys.ResourceID = ou.ResourceID GROUP BY sys.ResourceID) ou
group by 
    ou.ou
Order by 
    ou.ou

Comments

 

Count of PC within each OU | My CMS said:

Pingback from  Count of PC within each OU | My CMS

September 17, 2013 2:52 AM

This Blog

Syndication

News

Training

Powered by Community Server (Non-Commercial Edition), by Telligent Systems