Hello
My question concerns a crossover of VBSCRIPT to 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()
My question concerns a crossover of VBSCRIPT to 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()