Re: [OT] VB Scripting problem

  • From: Jim Harrison <jim@xxxxxxxxxxxx>
  • To: "[ISAserver.org Discussion List]" <isalist@xxxxxxxxxxxxx>
  • Date: Fri, 15 Aug 2003 07:20:13 -0700

Sorry, Bill - AD user scripting isn't my forte'.
Have you checked MSDN?

  Jim Harrison
  MCP(NT4, W2K), A+, Network+, PCG
  http://isaserver.org/Jim_Harrison/
  http://isatools.org
  Read the help / books / articles!


On Fri, 15 Aug 2003 07:27:02 +0200
 "William Robertson" <robertson.william@xxxxxxxxxxxxxx> wrote:
http://www.ISAserver.org


Hi there

 

Sorry to bother this list with a VB problem, but with all the MS.Blaster VB
Code running around I'm sure that someone on this list is more than capable
of saving me from my newbie-VB skills :-)

 

I wish to correct the Display Names of all users in my AD and have written a
script to do it. Following is the crux of the script:

 

While Not objRecordset.EOF

    Set objUser = GetObject("LDAP://"; &
objRecordset.Fields("distinguishedName"))

            FullName = objUser.Get("givenName") & " " & objUser.Get("sn")

            objUser.PutEx ADS_PROPERTY_CLEAR, "initials", 0

            objUser.Put "displayName", FullName

            objUser.Put "name", FullName

            objUser.SetInfo

    objRecordset.MoveNext

Wend

 

What I found is that just by writing the "displayName" attribute my problem
is not solved because when I browse my AD I still see a user's previous
name. I then used ldp.exe to find that the "name" attribute is another
attribute that I have to change, but when I try to run my script I get an
error saying:

"The server is unwilling to process the request."

 

I presume that the "name" (and "cn" for that matter) attributes are
essentially protected and was wondering if you knew what attribute I could
use to try and correct the display names? So far the only way I know that it
works is to right-click a name and select the "rename" option.

 

Thanks

William R.

 

 

  _____  


William Robertson

AST Mpumalanga


Systems House / Consultant: Software


Tel: 013-2472703 / 083 638 0354

   Fax: 013-2462236

 


---------------------------------------------------------------------
Everything in this e-mail and attachments relating to the official 
business of Columbus Stainless is proprietary to the company. It is 
confidential, legally privileged and protected by law. Columbus 
Stainless does not own and endorse any other content. Views and 
opinions are those of the sender unless clearly stated as being that 
of Columbus Stainless. The person addressed in the e-mail is the sole 
authorised recipient.  Please notify the sender immediately if it has 
unintentionally reached you and do not read, disclose or use the 
content in any way. Whilst all reasonable steps are taken to ensure 
the accuracy and integrity of information and data transmitted 
electronically and to preserve the confidentiality thereof, no 
liability or responsibility whatsoever is accepted if information or 
data is,for whatever reason, corrupted or does not reach its intended
destination.
---------------------------------------------------------------------


------------------------------------------------------
List Archives: http://www.webelists.com/cgi/lyris.pl?enter=isalist
ISA Server Newsletter: http://www.isaserver.org/pages/newsletter.asp
ISA Server FAQ: http://www.isaserver.org/pages/larticle.asp?type=FAQ
------------------------------------------------------
Other Internet Software Marketing Sites:
Leading Network Software Directory: http://www.serverfiles.com
No.1 Exchange Server Resource Site: http://www.msexchange.org
Windows Security Resource Site: http://www.windowsecurity.com/
Network Security Library: http://www.secinf.net/
Windows 2000/NT Fax Solutions: http://www.ntfaxfaq.com
------------------------------------------------------
You are currently subscribed to this ISAserver.org Discussion List as: 
jim@xxxxxxxxxxxx
To unsubscribe send a blank email to $subst('Email.Unsub')


Other related posts: