SCCM 2012 R2 – Free disk space report

SCCM 2012 R2 – Free disk space report

Hi All,

a customer of mine called today and asked my help to build a report that shows machines with low disk space…

it is a really simple and i had already the query all machines with Low Disk space (below 10%) as well as critical disk space (below 1GB).

I created the report and while testing, it was not working. Looking on the database, the FreeSpace0 column was null…

an easy fix was to change the hardware inventory, logical disk class and selecting Free Space (MB). Once it was done and the client sent the new inventory, the report started working

SQL Query:

SELECT distinct
v_FullCollectionMembership_Valid SYS
join v_GS_LOGICAL_DISK LDISK on SYS.ResourceID = LDISK.ResourceID
WHERE LDISK.DriveType0 = 3 AND ((LDISK.FreeSpace0 <= ((LDisk.Size0 * 10)/100)) or (LDISK.FreeSpace0 <= 1024)) and sys.CollectionID = ‘SMS00001’



Raphael is a 9 times Microsoft MVP with over 20 years of experience in IT, in which 13 years have been dedicated to System Center and Automation. His extended experience has been developed through several IT roles, from first-line support to principal consultant, towards a wide range of clients and sectors. One of the four MVPs in Enterprise Client Management in the UK, Raphael holds more than 30 Microsoft certifications and is an MCT (Microsoft Certified Trainer). Since 2008, Raphael has been providing Microsoft trainings from basic to advanced levels in several categories. Throughout his career, Raphael has joined as speaker in well-known events such as TechEd and Gartner Security Risk Management. He also organised community events and lectured around the world, sharing best practices and knowledge within the industry. Bilingual in English and Portuguese, Raphael has authored diverse articles published in Microsoft's TechEd, served as the editor-in-chief of a magazine focused on System Center in Brazil and wrote two books: "Understanding System Center 2012 SP1 Configuration Manager: The walkthrough book" and "System Center 2012 R2 Configuration Manager: Automation from Zero to Hero".

Tagged with: , , , ,