→ Celebrate SysAdmin Day 2024 with Lansweeper Enter our Giveaway here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
GSNETX
Engaged Sweeper
I am looking for a report that will give me the PCs, and Laptops in my Active Directory and when their Created Date in AD with the usernames, and departments for each? I am not sure if it is possible but hoping it can be done. Thanks in advance
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
In order to know the logged on users, you need to have the computers scanned with Lansweeper. From AD computer accounts, we don't scan the account creation date. What might help you is tblADComputers.lastchanged, which contains the date of the last change on this Active Directory account. Please find an example report below:


Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblADComputers.Lastchanged As [Last AD change],
tblAssets.Username,
tblADusers.Department As [User Department],
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Where tblAssetCustom.State = 1
Order By tblAssets.AssetName

View solution in original post

2 REPLIES 2
GSNETX
Engaged Sweeper
This works great! I have enough information to get me to where I need. Thank You 🙂
Daniel_B
Lansweeper Alumni
In order to know the logged on users, you need to have the computers scanned with Lansweeper. From AD computer accounts, we don't scan the account creation date. What might help you is tblADComputers.lastchanged, which contains the date of the last change on this Active Directory account. Please find an example report below:


Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblADComputers.Lastchanged As [Last AD change],
tblAssets.Username,
tblADusers.Department As [User Department],
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Where tblAssetCustom.State = 1
Order By tblAssets.AssetName