2 weeks ago
Dear Community
We have lots of Servers with Unallocated Disk Space, and its very time consuming to manually check each Server, whenever we need disk space for other VM's. Right now there is no community made, or Built in Report for this Function. Unallocated Space is not visible at all by LanSweeper. How can we visualize this within LanSweeper ?
Solved! Go to Solution.
2 weeks ago - last edited 2 weeks ago
Try this:
Select Top (1000000) tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen As [Last successful scan],
tblAssets.Lasttried As [Last scan attempt],
tblVolume.Name As VolumeName,
tblVolume.DriveLetter,
tblVolume.Label As LogicalDiskName,
Case tblVolume.DriveType
When 0 Then 'Unknown'
When 1 Then 'No Root Directory'
When 2 Then 'Removable Disk'
When 3 Then 'Local Disk'
When 4 Then 'Network Drive'
When 5 Then 'Compact Disk'
Else 'RAM Disk'
End As DriveType,
Cast(tblVolume.FreeSpace / 1024 / 1024 / 1024 As numeric) As FreeGB,
tblVolume.Capacity,
Cast(tblVolume.Capacity / 1024 / 1024 / 1024 As numeric) As TotalSizeGB,
tblVolume.Automount,
tblVolume.BlockSize,
tblVolume.Compressed,
tblVolume.DeviceID,
tblVolume.DirtyBitSet,
tblVolume.ErrorCleared,
tblVolume.ErrorDescription,
tblVolume.ErrorMethodology,
tblVolume.FileSystem,
tblVolume.IndexingEnabled,
tblVolume.PageFilePresent,
tblVolume.SupportsDiskQuotas,
tblVolume.SupportsFileBasedCompression,
tblVolume.Lastchanged
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblVolume On tblAssets.AssetID = tblVolume.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Outer Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblState On tblState.State = tblAssetCustom.State
Where tblState.Statename = 'Active' And Coalesce(tblVolume.DriveLetter, '') = '' and Coalesce(tblVolume.Label, '') = ''
Order By tblAssets.Domain,
tblAssets.AssetName,
VolumeName
a week ago
It lists all the Servers with Unallocated Space. Many thanks !
2 weeks ago - last edited 2 weeks ago
Try this:
Select Top (1000000) tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen As [Last successful scan],
tblAssets.Lasttried As [Last scan attempt],
tblVolume.Name As VolumeName,
tblVolume.DriveLetter,
tblVolume.Label As LogicalDiskName,
Case tblVolume.DriveType
When 0 Then 'Unknown'
When 1 Then 'No Root Directory'
When 2 Then 'Removable Disk'
When 3 Then 'Local Disk'
When 4 Then 'Network Drive'
When 5 Then 'Compact Disk'
Else 'RAM Disk'
End As DriveType,
Cast(tblVolume.FreeSpace / 1024 / 1024 / 1024 As numeric) As FreeGB,
tblVolume.Capacity,
Cast(tblVolume.Capacity / 1024 / 1024 / 1024 As numeric) As TotalSizeGB,
tblVolume.Automount,
tblVolume.BlockSize,
tblVolume.Compressed,
tblVolume.DeviceID,
tblVolume.DirtyBitSet,
tblVolume.ErrorCleared,
tblVolume.ErrorDescription,
tblVolume.ErrorMethodology,
tblVolume.FileSystem,
tblVolume.IndexingEnabled,
tblVolume.PageFilePresent,
tblVolume.SupportsDiskQuotas,
tblVolume.SupportsFileBasedCompression,
tblVolume.Lastchanged
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblVolume On tblAssets.AssetID = tblVolume.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Outer Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblState On tblState.State = tblAssetCustom.State
Where tblState.Statename = 'Active' And Coalesce(tblVolume.DriveLetter, '') = '' and Coalesce(tblVolume.Label, '') = ''
Order By tblAssets.Domain,
tblAssets.AssetName,
VolumeName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now