December 18 2010

SCCM report to show disk space for all servers

I needed an SCCM report to show the disk space details (total space, free space) for all servers in the environment. I had a look at this post – http://www.myitforum.com/absolutenm/templates/?a=20271 – updated the query and this is the result:

SELECT SYS.Name,LDISK.DeviceID0, LDISK.Description0, LDISK.VolumeName0,
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_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 = 'SMS000DS'
ORDER BY SYS.Name, LDISK.DeviceID0

 
 



----------------------------------------------------------------------------
I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.

----------------------------------------------------------------------------


Tags: , , , ,

Posted December 18, 2010 by danovich in category "SMS / SCCM

5 COMMENTS :

  1. By Tuckwell on

    When I run this Query using SQL Server Management Studio, I receive the following error message:
    (I’ve read that the Query might be returning too many rows)

    Have you had any experiences like this?

    Msg 8115, Level 16, State 2, Line 1
    Arithmetic overflow error converting expression to data type int.

    Reply
    1. By Kiran on

      Tuckwell,

      I ran to same errror ‘Arithmetic overflow error converting expression to data type int’.

      Were you able to resolve this issue?

      Best Regards,
      Kiran

      Reply
  2. By jefmes on

    Thanks Danovich, really helped me out today. One or two little tweaks and I got what I needed. Thanks for sharing.

    Reply
  3. By Sharath Chandra on

    This query helped me in generating the disk space of all systems. Thanks for sharing.

    Reply

Leave a Reply