Announcement

Collapse
No announcement yet.

Read Write Custom Attribute

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Read Write Custom Attribute

    Hi,

    I have created a ustom attribute and would like to read and write this.
    I have been inspired by the EmployeeID VBS script.

    I have created this one:

    Code:
    Dim opptp
    Dim oUser
    Dim temp
    Set opptp = Wscript.Arguments
    Set oUser = GetObject(opptp(0))
    temp = InputBox("Current PPTP Password: " & oUser.Get("NetasqAuth-pptp-password") & vbCRLF & vbCRLF & "If you would like enter a new Password or modify the existing one, enter the new Value in the textbox below")
    if temp <> "" then oUser.Put "NetasqAuth-pptp-password",temp
    oUser.SetInfo
    Set oUser = Nothing
    Set opptp = Nothing
    Set temp = Nothing
    WScript.Quit
    No when i right click on a user and execute this code i get the error:


    Line: 6
    Char: 1
    Error: The directory property cannot be found in the cahce.

    Code: 8000500D
    Source: Active Directory

    I found out that if i use Adsiedit and alter the value of this attribute to whatever i want and execute this again, it works.

    Is there a way to pass this?
Working...
X