Re: Help - need to change an attribute value



Sabo, Eric wrote:

Is there any way to change an attribute value?

All I need to change is the syntax - we have it set at "Case Sensitive
String" and the vendor is saying it needs to be "Case Insensitive String".

What tool could I use to accomplish this?

If all users have the same value for the attribute, it can be done in ADUC.
Otherwise, if everyone has a different value, you need to use a script. If
by case insensitive you mean all lower case, you can use the LCase function
in VBScript. If the attribute is a single valued string, a script can modify
the attribute value for all users in the domain (or in an Organizational
Unit) to make it lower case.

What is the attribute?
Does everyone have the same value assigned?
Do you want the existing value made lower case?
Should this be done to all users in the domain, all in an OU?

A quick example for all users in an OU:
========
' Bind to OU.
Set objOU = GetObject("LDAP://ou=Sales,dc=MyDomain,dc=com";)
' Filter on user objects.
objOU.Filter = Array("user")
' Enumerate users in the OU.
For Each objUser In objOU
' Retrieve attribute value.
strDeparment = objUser.department
' Make lower case.
strDepartment = LCase(strDepartment)
' Assign new value.
objUser.department = strDepartment
' Save changes.
objUser.SetInfo
Next
==========
To modify users in many OU/Containers throughout, you would use ADO to
retrieve all user distinguishedNames and the value of the attribute. ADO
would return recordset with one row for each usere. You would loop through
the recordset, bind to each user with the distingiushedName, retrieve the
attribute value, modify it, and update the attribute value of the user
object.

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


.



Relevant Pages

  • Re: Help - need to change an attribute value
    ... All I need to change is the syntax - we have it set at "Case Sensitive ... ' Retrieve attribute value. ... strDepartment = LCase ... To modify users in many OU/Containers throughout, ...
    (microsoft.public.windows.server.active_directory)
  • Re: Help - need to change an attribute value
    ... All I need to change is the syntax - we have it set at "Case Sensitive ... ' Retrieve attribute value. ... strDepartment = LCase ... To modify users in many OU/Containers throughout, ...
    (microsoft.public.windows.server.active_directory)
  • Re: Regex Question
    ... I need to modify the string data as a whole, not just retrieve the fields. ... > an html tag? ...
    (microsoft.public.dotnet.framework)
  • Re: Getting command line of another process
    ... It seems to be very complicated code just to retrieve the command line of a process. ... static public bool RetrieveUserModeProcessString(IntPtr HandleProcess, IntPtr PageBaseAddress, UInt32 UnicodeStringOffset, out string Result) ... UInt32 UnicodeStringSize = 8; ... pStringContent = Marshal.AllocCoTaskMemStringLength); ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Protecting a field within a form
    ... Public Function IsUserInGroup(strGroup As String, ... "John Nurick" wrote: ... display the fields you don't want the users to be able to modify. ... John Nurick [Microsoft Access MVP] ...
    (microsoft.public.access.gettingstarted)