ONE Row for each Server

For full details see the forum post. http://social.technet.microsoft.com/Forums/en-US/configmgrreporting/thread/bbc5e667-085f-47a2-a5b6-8a5089aa9e91

SELECT Distinct 
  R.Name0 as 'PC', 
  LD.FreeSpace0 as 'Free Space', 
  LD.Size0 as 'Size',
  isnull(Share.Path0,'n/a') as 'Path'
FROM 
  dbo.v_R_System R
  inner join dbo.v_GS_SERVICE Serv on R.ResourceID = Serv.ResourceID
  inner join dbo.v_GS_LOGICAL_DISK LD on  LD.ResourceID = R.ResourceID
  left outer join (select ResourceID, Name0, Path0 from v_GS_SHARE Where Name0 = 'Print$') Share on  Share.ResourceID = R.ResourceID 
 Where 
  Serv.DisplayName0 LIKE '%Windows Deployment Services%'
  AND LD.Name0 = 'D:'
 ORDER BY 
  R.Name0 

Leave a Reply

Your email address will not be published. Required fields are marked *