Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A PDQ Inventory SQL Report that calculates used disk space
SELECT
Computers.Name AS "Computer Name"
, LogicalDisks.LogicalDeviceId AS "Drive Letter"
, ( (LogicalDisks.Size - LogicalDisks.FreeSpace) / 1024 / 1024 / 1024 ) AS "Used Space GB"
FROM
Computers
INNER JOIN
LogicalDisks USING (ComputerId)
WHERE
<ComputerFilter>
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="16.5.0.0" MinimumVersion="3.1">
<Report>
<ReportDefinition name="Definition">
<Sql>SELECT
Computers.Name AS "Computer Name"
, LogicalDisks.LogicalDeviceId AS "Drive Letter"
, ( (LogicalDisks.Size - LogicalDisks.FreeSpace) / 1024 / 1024 / 1024 ) AS "Used Space GB"
FROM
Computers
INNER JOIN
LogicalDisks USING (ComputerId)
WHERE
&lt;ComputerFilter&gt;</Sql>
<ReportDefinitionTypeName>SqlReportDefinition</ReportDefinitionTypeName>
</ReportDefinition>
<Created>2018-08-29T10:17:08.0000000-06:00</Created>
<Description></Description>
<IsNew value="false" />
<Modified>2018-11-28T13:21:35.0000000-07:00</Modified>
<Name>Disk Usage</Name>
<Path>Reports\Disk Usage</Path>
<ReportFolderId value="1" />
<TypeName>SqlReport</TypeName>
<ReportType>SqlReport</ReportType>
</Report>
</AdminArsenal.Export>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.