cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SimplyClueless
Engaged Sweeper III
Hopefully some of these questions are useful for the community;

I have a new one; can someone help me with a query that specifies

Machine name
Last Scanned time
Hard drive size
Hard drive space

?


thanks in advance
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Please use the following report:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen As [last scan],
Sum(Cast(Cast(tblDiskdrives.Size As BigInt) / 1024 / 1024 / 1024 As Numeric))
As [Total size (GB)],
Sum(Cast(Cast(tblDiskdrives.Freespace As BigInt) / 1024 / 1024 /
1024 As Numeric)) As [Free in GB]
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen
Order By tblAssets.AssetID

View solution in original post

4 REPLIES 4
SimplyClueless
Engaged Sweeper III
good advice; this seems to work quite well
RCorbeil
Honored Sweeper II
Be aware that that report produces single values for size and capacity that are the sum of all drives, i.e. if you have a 250GB boot drive, a 1TB data drive and an external 1TB drive, the size reported will be based on 2.25TB. If you want all drives individually identified, take a look at this message thread.
Hemoco
Lansweeper Alumni
Please use the following report:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen As [last scan],
Sum(Cast(Cast(tblDiskdrives.Size As BigInt) / 1024 / 1024 / 1024 As Numeric))
As [Total size (GB)],
Sum(Cast(Cast(tblDiskdrives.Freespace As BigInt) / 1024 / 1024 /
1024 As Numeric)) As [Free in GB]
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen
Order By tblAssets.AssetID

 

I tried this query in my reports and saved it and now it shows up as duplicate hard drives.  I don't know where to find the report so I can remove it.  Any suggestions?