Re: Scripting newbie - Active Directory reporting of users/description
- From: Mack <mbarss@xxxxxxx>
- Date: Fri, 29 Jun 2007 12:36:29 -0700
On Jun 29, 1:53 pm, "Richard Mueller [MVP]" <rlmueller-
nos...@xxxxxxxxxxxxxxxxxxxx> wrote:
You can use ADO in a VBScript program to retrieve information about objects
in AD. This is not cpu intensive, most of the work is done efficiently on
the Domain Controller. For more on using ADO, see this link:
http://www.rlmueller.net/ADOSearchTips.htm
An example to retrieve Distinguished Name, NT Name (pre-Windows 2000 logon
name), and description for all users would be:
==================
Thank you for such a quick reply Richard.
I am playing with the script that you graciously provided. The script
is failing on a "undefined variable" error.
The error is as follows:
ListUsers.vbs(76, 9) Microsoft VBScript runtime error: Variable
is undefined: 'arrGroups'
arrDesc = adoRecordset.Fields("description").Value
If IsNull(arrDesc) Then
strDesc = ""
Else
For Each strItem In arrGroups
^^^^^^^^^^^ ---> should this be
"arrDesc"?
strDesc = strItem
Next
End If
As indicated above, should the line be "For Each strItem In arrDesc"
instead of arrGroups?
Malcolm
.
- Follow-Ups:
- Re: Scripting newbie - Active Directory reporting of users/description
- From: Richard Mueller [MVP]
- Re: Scripting newbie - Active Directory reporting of users/description
- References:
- Scripting newbie - Active Directory reporting of users/description
- From: Mack
- Re: Scripting newbie - Active Directory reporting of users/description
- From: Richard Mueller [MVP]
- Scripting newbie - Active Directory reporting of users/description
- Prev by Date: Re: Scripting newbie - Active Directory reporting of users/description
- Next by Date: Re: Scripting newbie - Active Directory reporting of users/description
- Previous by thread: Re: Scripting newbie - Active Directory reporting of users/description
- Next by thread: Re: Scripting newbie - Active Directory reporting of users/description
- Index(es):
Relevant Pages
|