Deleting user from AD by using DirectoryServices
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hi all, I am very new to DirectoryServices. I created an ActiveDirectory user by using DirectoryServices. I can find that added entry later-on aswell. But I still couldnt figure out that how can I delete an added user later. I tried DirectoryEntries.remove("username", DirectoryEntry.SchemalClassName); as mentioned on MSDN, but its keep on givng me an error like: Invalid DN name assigned. I think I have to get the GUID for user I want to delete but I have no idea how can I get the GUID for any user e.g. "testuser" in Active Directory Can anybody help me? btw, if this is not the right place to ask this question where should I ask this question? Thanks in Advance!!!!