‎01-26-2019 04:49 PM
‎01-29-2019 08:09 PM
‎01-29-2019 08:01 PM
‎01-28-2019 01:07 AM
‎01-29-2019 07:40 PM
JacobH wrote:
I got most of this report from the forum... you take this query and put WHERE tblDiskdrives.Caption = 'C:' and tblADComputers.OU = 'YOUR OU HERE'
if you want to include that OU and subOU's, you change it to LIKE 'YOUR OU HERE%' to match the front part and whatever comes afterwards.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysOS.OSname As OS,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssets.Domain,
tblDiskdrives.Caption,
tblDiskdrives.Freespace,
Cast(tblDiskdrives.Freespace / tblDiskdrives.Size * 100 As Numeric(36,2)) As
[% Free],
Cast(tblDiskdrives.Freespace / Power(2, 30) As Numeric(36,2)) As [GiB Free],
Cast(tblDiskdrives.Size / Power(2, 30) As Numeric(36,2)) As [GiB Capacity],
Cast(tblDiskdrives.Freespace / Power(10, 9) As Numeric(36,2)) As [GB Free],
Cast(tblDiskdrives.Size / Power(10, 9) As Numeric(36,2)) As [GB Capacity],
tblDiskdrives.Lastchanged As [Last changed],
tblADComputers.OU
From tblDiskdrives
Inner Join tblAssets On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblOperatingsystem On
tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblComputersystem.Domainrole > 1 And tblDiskdrives.DriveType = '3' And
Floor(tblDiskdrives.Size / Power(2, 20)) <> 0 And tblDiskdrives.Freespace /
tblDiskdrives.Size * 100 <= 2 And Floor(tblDiskdrives.Freespace / Power(2,
30)) < 25 And Floor(tblDiskdrives.Freespace / Power(10, 9)) < 25
Order By [% Free],
tblDiskdrives.Freespace,
tblDiskdrives.Caption
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now