Home All Groups Group Topic Archive Search About

retrieving all User accounts Profile prioperties



Author
13 Nov 2007 7:19 PM
Civic
I need to get a list of all user accounts in our domain, whether they have a
login script listed as part of their user account, and the name of the
script, from our AD.  Can someone assist me -or at least point me in the
right direction, with/for a script that would list this information from our
500+ users in 3 domain / sub domain network?

thanks in advance for your assistance.

Author
13 Nov 2007 11:13 PM
Richard Mueller [MVP]
Civic wrote:

>I need to get a list of all user accounts in our domain, whether they have
>a
> login script listed as part of their user account, and the name of the
> script, from our AD.  Can someone assist me -or at least point me in the
> right direction, with/for a script that would list this information from
> our
> 500+ users in 3 domain / sub domain network?

You can use ADO in a VBScript program for this. See this link for details:

http://www.rlmueller.net/ADOSearchTips.htm

In this case (using the variables from the above link):

strFilter = "(&(objectCategory=person)(objectClass=user)(scriptPath=*))"
strAttributes = "sAMAccountName,scriptPath"

scriptPath is the name of the attribute corresponding to the field labeled
"Logon script" on the "Profile" tab of the user properties dialog in ADUC.
sAMAccountName is the NT name (pre-Windows 2000 logon name) of the user.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--

AddThis Social Bookmark Button