Hello,
With the help of searching the forms, I was able to create an AD Inventory Report that matches what we've been documenting in our previous spreadsheet. The Problem I'm having is that I'm missing a couple of scanned computers in Lansweeper that don't show up in report. Can anyone help with what might be the root cause?
From the looks of it, it appears that the report is not displaying assets that have instances of the AD username being logged in else where.
The Report list the following:
Computer Asset Name
User Name (last logged on User)
Last Logon Time
Active Directory Computer Description
IP Address
OS
Manufacturer
Model
Serial Number
Number of Processors
Processor Type
Code:
Select Top 1000000 tblAssets.AssetName,
SubQuery.Username,
SubQuery.Domain As Userdomain,
SubQuery.LastLogon,
tblADComputers.Description,
tblAssets.IPAddress As [IP Address],
tsysOS.OSname As OS,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber As Serial,
tsysOS.Image As icon,
tblAssets.NrProcessors As #CPU,
tblAssets.Processor,
tblAssets.AssetID
From tblCPlogoninfo
Inner Join (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain,
Max(tblCPlogoninfo.logontime) As LastLogon
From tblCPlogoninfo
Group By tblCPlogoninfo.Username,
tblCPlogoninfo.Domain) SubQuery On tblCPlogoninfo.Username =
SubQuery.Username And tblCPlogoninfo.Domain = SubQuery.Domain And
tblCPlogoninfo.logontime = SubQuery.LastLogon
Inner Join tblAssets On tblAssets.AssetID = tblCPlogoninfo.AssetID
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblBIOS On tblAssets.AssetID = tblBIOS.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblDiskdrives.Caption = 'c:' And tblAssetCustom.State = 1
Order By tblAssets.AssetName