cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
servicedesk
Champion Sweeper II
Hi

I need a report that helps to identify duplicated Active Directory objects based on Lansweeper data.
For example, a list of AD computers with the same asset ID or same Maker serial number.

Thanks
5 REPLIES 5
servicedesk
Champion Sweeper II
Charles.X

I just been checking today and seems renamed information is added to the Assets comments field like:

20/11/2017 7:40:00 Renamed Workgroup\W10-1234\1 to mydomain\W10-1234\1
20/11/2017 7:00:00 Renamed mydomain\W7-1234\1 to Workgroup\W10-1234\1


I noticed old renamed computers in Active Directory, now doesn't have an Asset ID in Lansweeper. That's could be easy to retrieve with a custom script.

Do you think there's any other situations where Lansweeper could not create an Asset ID ?


Regards
fjca
Champion Sweeper II
servicedesk wrote:
Charles.X

I just been checking today and seems renamed information is added to the Assets comments field like:

20/11/2017 7:40:00 Renamed Workgroup\W10-1234\1 to mydomain\W10-1234\1
20/11/2017 7:00:00 Renamed mydomain\W7-1234\1 to Workgroup\W10-1234\1


I noticed old renamed computers in Active Directory, now doesn't have an Asset ID in Lansweeper. That's could be easy to retrieve with a custom script.

Do you think there's any other situations where Lansweeper could not create an Asset ID ?


Regards


Hello,

Due to te ever changing nature of our company we have the same issue, so sometime ago I've asked around the forum and ended up with a report that lists duplicate machines by motherboard UUID. Service tags could also be used, but they only work with brand name machines, and UUID's work also with OEM computers, like the ones we use.

That being said, they are not 100% correct, I've removed a few known troublesome UUID's from the list, but at least on our case, it works pretty well.




Select Top 1000000 tblAssets.AssetID,
tblComputerSystemProduct.UUID,
tblAssets.AssetName,
tblAssets.Domain,
tsysIPLocations.IPLocation,
tblAssets.IPAddress,
tblAssetCustom.Model,
tblBaseBoard.Product As Board,
tblAssetCustom.Serialnumber As [Service Tag],
tblBaseBoard.SerialNumber,
tblAssetCustom.Manufacturer,
tblAssetCustom.State,
tblADComputers.Lastchanged As AD_LastChanged
From tblAssets
Inner Join tblComputerSystemProduct On tblAssets.AssetID =
tblComputerSystemProduct.AssetID
Inner Join tblBaseBoard On tblAssets.AssetID = tblBaseBoard.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where
tblComputerSystemProduct.UUID Not Like
'%00000000-0000-0000-0000-000000000000%' And tblComputerSystemProduct.UUID Not
Like '%03000200-0400-0500-0006-000700080009%' And
tblComputerSystemProduct.UUID Not Like
'%15773880-AD8A-8149-2525-08606E1272B3%' And (Select Count(*)
From tblComputerSystemProduct As a
Where a.UUID = tblComputerSystemProduct.UUID) > 1
Order By tblComputerSystemProduct.UUID


Esben_D
Lansweeper Employee
Lansweeper Employee
So basically, you want a list of old the old names that are no longer used?

Unfortunately, Lansweeper doesn't scan AD computer name since it already scans this form the asset itself. You could use a report to show you the assets which have recently been renamed. If I remember correctly this also shows the name which was used before the rename.

A report to show the assets which have been renamed can be found in this topic.
servicedesk
Champion Sweeper II
Hello Charles.X

Thanks but this is not exactly the problem I would like to cover. I will try to explain it better:

For example, I have a computer W7 with name PREFIX-1234 and I need to reinstall the OS to W10 using a new name NEWPREFIX-1234.

That will be detected by Lansweeper as a rename and prevent the creation of duplicated assets. The problem is in the Active Directory will remain the old name.



Is technically possible have a report to list old non-used computers names due renaming in the Active Directory?



Thanks
Esben_D
Lansweeper Employee
Lansweeper Employee
There is already a kind of similar report in Lansweeper called "Asset: Duplicate Serial Number".

I slightly modified the report so that it will only show AD computers. If you are looking to remove duplicate assets, I would recommend enabling Windows Rename Detection.

Select tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Serialnumber,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblADComputers.OU,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join (Select Count(tblAssetCustom.AssetID) As Total,
Coalesce(tblAssetCustom.Serialnumber, N'') As Serial
From tblAssetCustom
Where tblAssetCustom.State = 1
Group By Coalesce(tblAssetCustom.Serialnumber, N'')
Having Count(tblAssetCustom.AssetID) > 1 And
Coalesce(tblAssetCustom.Serialnumber, N'') <> '') As Dups On
tblAssetCustom.Serialnumber = Dups.Serial
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblAssetCustom.State = 1