This is the SQL from a report I made this week.

SELECT DISTINCT
      SYS.Netbios_Name0
     ,SYS.Is_Virtual_Machine0
     ,Processor.Name0
     ,COUNT(SYS.ResourceID)
     ,Processor.NumberOfCores0
     ,Processor.NumberOfLogicalProcessors0
FROM fn_rbac_R_System(@UserSIDs)  SYS
JOIN fn_rbac_GS_PROCESSOR(@UserSIDs)  Processor on
SYS.ResourceID=Processor.ResourceID
JOIN v_FullCollectionMembership FCM on FCM.ResourceID=SYS.ResourceID
WHERE FCM.CollectionID = @variable
Group By
SYS.Netbios_Name0,Processor.Name0,Processor.NumberOfCores0,Processor.NumberOfLogicalProcessors0,SYS.Is_Virtual_Machine0
ORDER BY SYS.Netbios_Name0

On Thu, Dec 1, 2016 at 6:55 AM, Stuart Watret <stu...@offshore-it.co.uk>
wrote:

> Anyone share a bit of query magic I can utilise to count disks in
> machines, that’s all I need.
>
> Cheers
>
> Stuart Watret
>
>



Reply via email to