‎06-14-2016 02:50 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblOperatingsystem.Caption,
tblAssets.Username,
tsysOS.Image As icon,
tblDiskdrives.Caption As Caption1,
tblDiskdrives.Size / 1073741824 As [Size (GB)],
tblDiskdrives.Freespace / 1073741824 As [Freespace (GB)]
From tblAssets
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tblADusers On tblADusers.Username = tblAssets.Username
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID And
tblDiskdrives.AssetID = tblAssets.AssetID
Where tblAssetCustom.Manufacturer Not Like '%VMware%' And
tblAssetCustom.Manufacturer Not Like '%Parallels%' And
tblAssetCustom.Model Not Like '%virtual%' And tblAssetCustom.Model Not Like
'%HVM%' And tsysOS.OSname Not Like 'Win 2008%' And
tsysOS.OSname Not Like 'Win 2012%' And tsysOS.OSname Not Like 'Win 2003%' And
tblAssets.AssetName Not Like 'Axtw%' And tblAssets.AssetName Not Like 'W7%'
And tblAssetCustom.State = 1 And tblADComputers.OU Like '%OU=AUS%'
Order By tblAssets.AssetName,
Caption1
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now