RE: [OT] VB Scripting problem

  • From: "cismic" <cismic@xxxxxxx>
  • To: "'[ISAserver.org Discussion List]'" <isalist@xxxxxxxxxxxxx>
  • Date: Tue, 19 Aug 2003 04:07:01 -0700

Hi William,

I still would look at the displyName.

-----Original Message-----
From: William Robertson [mailto:robertson.william@xxxxxxxxxxxxxx] 
Sent: Monday, August 18, 2003 7:51 AM
To: [ISAserver.org Discussion List]
Subject: [isalist] RE: [OT] VB Scripting problem


http://www.ISAserver.org


Hi Joseph

Thanks for the link, another invaluable resource for my archives...

However they don't make mention of how to change the "name" attribute.
But what get's me is that if I right-click the Name and select Rename,
then I can do it just fine, so why can't I do it through a VBScript...?

Thanks
William R.

-----Original Message-----
From: cismic [mailto:cismic@xxxxxxx] 
Sent: 18 August 2003 16:21 PM
To: [ISAserver.org Discussion List]
Subject: [isalist] RE: [OT] VB Scripting problem

http://www.ISAserver.org


The "name" attribute is basically a distinguished name in active
directory and set by the schema administrator. The following link shows
what can and should be changed with a user.  
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/
ad/user_object_user_interface_mapping.asp

A field that you might try changing with your fullName fields is the
"displayName", which is at a higher level then the user property pages.

Joseph

-----Original Message-----
From: William Robertson [mailto:robertson.william@xxxxxxxxxxxxxx] 
Sent: Monday, August 18, 2003 5:30 AM
To: [ISAserver.org Discussion List]
Subject: [isalist] RE: [OT] VB Scripting problem


http://www.ISAserver.org



Hi Shaun

 

I am not binding with a specific username/pwd )Frankly because eI can
never tell when I need to :-))

Anyway, my full code looks like this:

 

Const ADS_PROPERTY_CLEAR = 1 

Set objConnection = CreateObject("ADODB.Connection")

objConnection.Open "Provider=ADsDSOObject;" 

Set objCommand = CreateObject("ADODB.Command")

objCommand.ActiveConnection = objConnection 

 

'OU and DC values changed to protect the innocent

objCommand.CommandText =
"<LDAP://OU=<OUName>,DC=<domainname>,DC=com>;(&(objectCategory=person)(o
bjectClass=user));distinguishedname;onelevel"

Set objRecordSet = objCommand.Execute 

 

While Not objRecordset.EOF

    Wscript.Echo objRecordset.Fields("distinguishedName")

    

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

            'Take note, if a user has a blank decsription then the
objUser.Get function will fail - still need to work out how to get past
this

            objUser.Put "description", "The new description goes here"

            

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

            objUser.PutEx ADS_PROPERTY_CLEAR, "initials", 0

            objUser.Put "displayName", FullName

            'This next line is the one that fails

            'objUser.Put "name", FullName

            objUser.SetInfo

objRecordset.MoveNext

Wend 

objConnection.Close

 

I do not see that it is necessary to bind with a particular user/pwd as
it manages to do all the other functions just fine. My theory is that
the "name" attribute is protected somehow and I need to find another way
to get to change it.

 

Cheers

William R.

 

 



---------------------------------------------------------------------
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:
cismic@xxxxxxx To unsubscribe send a blank email to
$subst('Email.Unsub') 


------------------------------------------------------
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:
robertson.william@xxxxxxxxxxxxxx To unsubscribe send a blank email to
$subst('Email.Unsub')

---------------------------------------------------------------------
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:
cismic@xxxxxxx To unsubscribe send a blank email to
$subst('Email.Unsub')



Other related posts: