C
Cameron Frasnelly
Can anyone tell me why the below keeps giving me
[COMException (0x80072035): The server is unwilling to process the request.]
If Impersonation_MOD.impersonateValidUser("DomainAdmin", "pwst.intra",
"Password") = True Then
Dim AD As DirectoryEntry = New DirectoryEntry("LDAP://pwst.intra",
"DoaminAdmin", "Password")
Dim NewUser As DirectoryEntry = AD.Children.Add("CN=Testerboy", "user")
NewUser.Properties("samAccountName").Add("Tester1.Tester2")
NewUser.Properties("givenName").Add("Tester1")
NewUser.Properties("sn").Add("Tester2")
NewUser.Properties("userAccountControl").Add(512)
NewUser.CommitChanges()
NewUser.Invoke("SetPassword", "Minetoday1")
NewUser.CommitChanges()
Impersonation_MOD.undoImpersonation()
End If
[COMException (0x80072035): The server is unwilling to process the request.]
If Impersonation_MOD.impersonateValidUser("DomainAdmin", "pwst.intra",
"Password") = True Then
Dim AD As DirectoryEntry = New DirectoryEntry("LDAP://pwst.intra",
"DoaminAdmin", "Password")
Dim NewUser As DirectoryEntry = AD.Children.Add("CN=Testerboy", "user")
NewUser.Properties("samAccountName").Add("Tester1.Tester2")
NewUser.Properties("givenName").Add("Tester1")
NewUser.Properties("sn").Add("Tester2")
NewUser.Properties("userAccountControl").Add(512)
NewUser.CommitChanges()
NewUser.Invoke("SetPassword", "Minetoday1")
NewUser.CommitChanges()
Impersonation_MOD.undoImpersonation()
End If