SCCM 2012: Diskspace Report sorted by Freespace Percentage

System Center admins often get asked for disk space reports.
Depending on the discovery settings the data can be more current in SCOM or SCCM.
So you need to decide which datasource you use.

I have created a report for System Center Configuration Manager 2012, which lists Total Disk Space (MB), Total Free Space (MB), Total Used Space (MB), Total Free Space Percent and Total Used Space Percent.

It sorts by Total Free Space Percent and colour codes the output with this rule:

< 20 %: red
< 40 %: orange
Rest: green

You can select any device collection.


The report can be downloaded here.

Published by


* 1974, female, working as a Consultant. Main topics: MS System Center, ServiceNow. Twitter: @SN_Tipps

6 thoughts on “SCCM 2012: Diskspace Report sorted by Freespace Percentage”

    1. Hi,
      here are the queries.
      SELECT CollectionID, v_GS_LOGICAL_DISK.DeviceID0, v_R_System.Netbios_Name0 [System Name], v_GS_COMPUTER_SYSTEM.Model0 as Model,
      SUM (v_GS_LOGICAL_DISK.Size0) AS [Total Disk Space:],
      SUM (v_GS_LOGICAL_DISK.FreeSpace0) AS [Total Free Space:],
      Convert(Decimal(4,2),Round(100.0 * SUM (v_GS_LOGICAL_DISK.FreeSpace0) / SUM (v_GS_LOGICAL_DISK.Size0),2)) AS [Total Free Space Percent:],
      Convert(Decimal(4,2),Round(100.0 * (SUM (v_GS_LOGICAL_DISK.Size0)-SUM (v_GS_LOGICAL_DISK.FreeSpace0))/ SUM (v_GS_LOGICAL_DISK.Size0),2)) AS [Total Used Space Percent:],
      SUM (v_GS_LOGICAL_DISK.Size0)-SUM (v_GS_LOGICAL_DISK.FreeSpace0) AS [Total Used:],
      FROM v_R_System
      inner join v_GS_PC_BIOS on v_R_System.ResourceID=v_GS_PC_BIOS.ResourceID
      inner join v_GS_COMPUTER_SYSTEM on v_R_System.ResourceID=v_GS_COMPUTER_SYSTEM.ResourceID
      inner join v_GS_LOGICAL_DISK on v_R_System.ResourceID = v_GS_LOGICAL_DISK.ResourceID
      inner join v_FullCollectionMembership on v_FullCollectionMembership.ResourceID=v_R_System.ResourceID AND v_FullCollectionMembership.CollectionID=@CollectionID
      where v_GS_COMPUTER_SYSTEM.Model0 like ‘%’ and v_GS_LOGICAL_DISK.DeviceID0 like ‘%’ AND v_GS_LOGICAL_DISK.Size0 IS NOT NULL
      GROUP BY
      CollectionID, v_R_System.Netbios_Name0, v_GS_COMPUTER_SYSTEM.Model0, v_GS_LOGICAL_DISK.DeviceID0, LastHWScan
      ORDER by [Total Free Space Percent:]

      SELECT v_Collection.Name ,v_Collection.CollectionID
      FROM v_Collection
      Order By v_Collection
      Kind Regards,

  1. Hi, thanks for sharing this – When viewing the report in SCCM2012 only the Total disk space column gets data, the others are blank. Am I missing some presetup to collect data?

    1. Sorry – seems that some clients are sending data and others (most) does not – Lenovo T-series.
      Tried to trigger the Hardware inventory on clients but no additional data is received.
      Any ideas?
      Best Regards

      1. Morten,

        have you checked what is shown in the Resource Explorer for these devices? The Free Space (MB) should be shown there. The client will have a problem with the hardware inventory if nothing is listed there.



  2. Hi Natascia
    Thanks for your reply. For some reason Lenovo X61 does not give data for the HD but all others (400 PC’s) are now updated. Extremely useful – thanks again

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s