cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
samtra
Engaged Sweeper

I need to add a custom field in report "Active Directory: Enabled/disabled users" where I can manually write a data on each individual user. Is it possible? How can i do it?

I want that the data is stored in LanSweeper Database

Many thanks.

1 ACCEPTED SOLUTION

First of all - here is the SQL.  Create a new report, give it an appropriate title for your needs.

Select Top 1000000 tblADusers.Username As Username,
tblADusers.IsEnabled As [Account Enabled?],
tblADusers.whenCreated As [Account Created],
tblADusers.LastLogon As [User Last Logged on],
extension1.Value As Description
From tblADusers
Left Join (Select tblAdProperty.Value,
tblAdProperty.AdObjectId
From tblAdProperty
Inner Join tsysAdPropertyType On tsysAdPropertyType.TypeId =
tblAdProperty.TypeId
Where tsysAdPropertyType.Name = 'ExtensionAttribute1') As extension1 On
extension1.AdObjectId = tblADusers.ADObjectID

save and run.

 

To edit the extensionAttribute, open Active Directory with an admin account, select view and make sure "Advanced features" is ticked. (screenshot attached)

Next open the properties for the user object you want to add the description to, and select the "Attribute Editor" tab. (screenshot attached)

Then scroll down to ExtensionAttribute1, double click it and add your description.  click ok, then save all changes. (screenshot attached)

If extension attribute 1 is already being used - choose another, but you will need to change all instances of the the attribute number in the sql code too.

In Lansweeper, go to Scanning, and re-scan your active directory domain or users paths - whatever way you have it configured.

Once that scan is complete, run that report again and the information should show.

Hope that helps.

View solution in original post

8 REPLIES 8
uSlackr
Engaged Sweeper II

You cannot edit this data through Lansweeper.  You will have to use an AD tool and have admin (or delegated rights) to change AD

Ian_Prentice
Champion Sweeper

The User object in active directory has a description field under the "General" tab.  You can use this for whatever description you feel is suitable.

Then, in the Enable/Disable users report, edit it, and from the "tblADusers' box, select "Description".   Save and run the report. The description you used in the AD user object will now show in the report.  Remember to make sure Lansweeper has scanned AD after any changes you make to the description on the user object.

Hope that helps.

brandon_jones
Champion Sweeper III

There is a buile in report that shows the AD status for each user. It is called Enabled/disabled users.

Yes, there is the Enabled/disabled users report, but i want to insert in this report a custom field because i want to insert a description.
This description i want to archive in LanSweeper DB.
Is it possible? How do i do?

uSlackr
Engaged Sweeper II

Sorry - this was wrong.

There are custom fields you can attach to asset, but I don't see a way to add one to an AD object.  

 

Another option would be to use the "ExtensionAttribute" within the Attribute editor on the AD User object as a custom description field.

Within the Lansweeper report, the Expression 'extension1.Value' or extension2.Value' etc. could be used.

Thanks @Ian_Prentice , can you post any screens to guide me on how to do it?

First of all - here is the SQL.  Create a new report, give it an appropriate title for your needs.

Select Top 1000000 tblADusers.Username As Username,
tblADusers.IsEnabled As [Account Enabled?],
tblADusers.whenCreated As [Account Created],
tblADusers.LastLogon As [User Last Logged on],
extension1.Value As Description
From tblADusers
Left Join (Select tblAdProperty.Value,
tblAdProperty.AdObjectId
From tblAdProperty
Inner Join tsysAdPropertyType On tsysAdPropertyType.TypeId =
tblAdProperty.TypeId
Where tsysAdPropertyType.Name = 'ExtensionAttribute1') As extension1 On
extension1.AdObjectId = tblADusers.ADObjectID

save and run.

 

To edit the extensionAttribute, open Active Directory with an admin account, select view and make sure "Advanced features" is ticked. (screenshot attached)

Next open the properties for the user object you want to add the description to, and select the "Attribute Editor" tab. (screenshot attached)

Then scroll down to ExtensionAttribute1, double click it and add your description.  click ok, then save all changes. (screenshot attached)

If extension attribute 1 is already being used - choose another, but you will need to change all instances of the the attribute number in the sql code too.

In Lansweeper, go to Scanning, and re-scan your active directory domain or users paths - whatever way you have it configured.

Once that scan is complete, run that report again and the information should show.

Hope that helps.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now