M
Mike
I am trying to create a small admin toolset using visual studio 2005 (vb).
I want to be able to supply a domain username and have it add to the local
workstation Remote desktop user's group. This is the code I have so far.
Dim LCL As New DirectoryEntry
Dim DOM As New DirectoryEntry
Dim DOMUSR As DirectoryEntry
Dim LCLGRP As DirectoryEntry
LCL = "WinNT://" & "PCNAME" & ",computer"
DOM = "WinNT://domain"
DOMUSR = DOM.Children.Find("USERID", "user")
LCLGRP = LCL.Children.Find("LOCAL_GROUP", "group")
LCLGRP.Invoke("Add", New Object() {DOMUSR.Path.ToString})
but I keep getting the following error, this is happening on all four dim
statements.
Error 1 Type 'DirectoryEntry' is not defined.
The directory entry does not appear to be in the classes.
I want to be able to supply a domain username and have it add to the local
workstation Remote desktop user's group. This is the code I have so far.
Dim LCL As New DirectoryEntry
Dim DOM As New DirectoryEntry
Dim DOMUSR As DirectoryEntry
Dim LCLGRP As DirectoryEntry
LCL = "WinNT://" & "PCNAME" & ",computer"
DOM = "WinNT://domain"
DOMUSR = DOM.Children.Find("USERID", "user")
LCLGRP = LCL.Children.Find("LOCAL_GROUP", "group")
LCLGRP.Invoke("Add", New Object() {DOMUSR.Path.ToString})
but I keep getting the following error, this is happening on all four dim
statements.
Error 1 Type 'DirectoryEntry' is not defined.
The directory entry does not appear to be in the classes.