List all servers with Disk Usage Summary:
SELECT DISTINCT
FCM.Name AS 'Computer Name',
LDSK.DeviceID0 'Drive Letter',
LDSK.Description0,
LDSK.VolumeName0,
LDSK.FreeSpace0 AS 'Free Space (MB)',
LDSK.FreeSpace0/1024 AS 'Free Space (GB)',
LDSK.FreeSpace0*100/LDSK.Size0 AS 'Free Space (%)',
LDSK.Size0/1024 AS 'Total Space (GB)'
FROM
v_FullCollectionMembership FCM
JOIN
v_GS_LOGICAL_DISK LDSK
on FCM.ResourceID = LDSK.ResourceID
JOIN
v_R_System SYS
ON FCM.ResourceID = SYS.ResourceID
WHERE
LDSK.DriveType0 = 3
AND LDSK.Size0 > 0
AND FCM.CollectionID = 'SMS000DS'
ORDER BY
FCM.Name,
LDSK.DeviceID0
No comments:
Post a Comment