Monday, 8 September 2014

HD space Report

This report will show the HD space status of all the machines in SMS/SCCM:

****************************************************************************************
SELECT 
SYS.Name,
LDISK.DeviceID0,  
ou.System_OU_Name0,
LDISK.FreeSpace0 as [Free space (MB)],
LDISK.FreeSpace0/1024 as [Free space (GB)],
LDISK.Size0/1024 as [Total space (GB)],
LDISK.FreeSpace0*100/LDISK.Size0 as C074
FROM v_FullCollectionMembership SYS
join v_RA_System_SystemOUName ou ON sys.ResourceID = ou.ResourceID
join v_GS_LOGICAL_DISK LDISK on SYS.ResourceID = LDISK.ResourceID
JOIN v_R_System RSYS ON SYS.ResourceID = RSYS.ResourceID
WHERE
LDISK.DriveType0 =3 AND
LDISK.Size0 > 0
AND SYS.CollectionID = 'SMS00001'
ORDER BY SYS.Name, LDISK.DeviceID0

*******************************************************************************************

0 commenti:

Post a Comment

Give me you feedback!