Welcome !
         

 Equivalent of "obj.PutEx ADS" in VB.NET

Author Message
stubar

  • Total Posts : 72
  • Scores: 0
  • Reward points : 0
  • Joined: 7/14/2005
  • Status: offline
Equivalent of "obj.PutEx ADS" in VB.NET Monday, November 08, 2010 10:36 PM (permalink)
0

Hello
Not sure if this is the right area as it concerns a crossover of VBSCRIPT and DotNet, but here goes
 
I have a project in VB.NET concerning users in AD. Basically they are disabled but need to be enabled again. This means clearing the AUTHORIG property.
If I was doing it in VBSCRIPT i would simply use obj.PutEx ADS_PROPERTY_CLEAR, "authorig", 0 but I can't find the equivalent in DotNet
I can set it, as below, but can't clear it. Any advice?
 
            Dim dey As DirectoryEntry = New DirectoryEntry("LDAP://.... Blah")
            Dim authorig As PropertyValueCollection = dey.Properties("authorig"
            authorig = dey.Properties("authorig")
            Dim colarray() As Object = {"DistinginguishedName"}
            authorig.Value = colarray
            dey.CommitChanges()
 
Can't type, can't spell, can barely read. Can't you tell?
 
#1
    stubar

    • Total Posts : 72
    • Scores: 0
    • Reward points : 0
    • Joined: 7/14/2005
    • Status: offline
    Re:Equivalent of "obj.PutEx ADS" in VB.NET Tuesday, November 09, 2010 4:08 AM (permalink)
    0
    Just to save anybody some time the answer is:
    Dim colarray() As Object = {}
    Thanks

    Stuart
     
    #2
      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2017 ASPPlayground.NET Forum Version 3.9