Jump to content

Recommended Posts

Posted

I've been playing with the AD UDF (by water) and I'm really not sure how it works (even after playing for several hours) and I'm hoping that someone can point me in the right direction on this.

 

What I want to do is make it so if I give a network username, it returns back the information about said user (IE name, org, dept, etc). I know the info is in AD, I just don't know how to pull it using the UDF. Anyone have suggestions?

Posted

Run the _AD_GetObjectProperties.au3 example script and you will get all properties of the user in readable format.

My UDFs and Tutorials:

  Reveal hidden contents

 

  • 1 year later...
Posted (edited)

I know the question is pretty old but I think it is still a question that many administrators have.
The answers given do not get even close to what was asked.
In both answers you already have to know the user object to get more info about it.


But the question is how to get the user object when you only know a part of the Lastname and the SamAccountName has nothing in common with the DisplayName or the LastName of the user.


Example: Lastname: Miller, SamAccountName: XY123456

You know the LastName or a part of it and want to query for the SamAccountName. How do you do that with the AD UDF?
 

Edited by gquincy
Posted (edited)

Please have a look at example 3 in _AD_GetObjectsInOU.au3
This example uses ANR:

  Quote

Use ANR (Ambigous Name Resolution) to get all objects with the same given Name as the current user in the ANR-supported attribute fields.
Searches the whole domain.

Expand  

See: https://social.technet.microsoft.com/wiki/contents/articles/22653.active-directory-ambiguous-name-resolution.aspx

Edited by water

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Great you like it ;)

My UDFs and Tutorials:

  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...