I am able to update/modify this tab via vbscript, but I have this application that does user creation processes via the helpdesk.
I cannot find where or how to do this from vb.net.
I can create the user, mailbox and add the user to all the groups they need to be in, but I don't know how to add information to the Terminal Services Tab.
All of this works except for the terminal services stuff.
Dim ou AsNew DirectoryEntry("LDAP://" & strLDAP)
usr = ou.Children.Add("CN=" & strCN, "user")
usr.Properties("samAccountName").Value = strUserName
usr.CommitChanges()
usr.Properties("sn").Value = strLastName
usr.Properties("givenName").Value = strFirstName
usr.Properties("displayName").Value = strDisplayName
usr.Properties("description").Value = strJobTitle
usr.Properties("pwdLastSet").Value = 0
usr.Properties("TerminalServicesProfilePath").Value = "\\srv\Profiles$\" & strUserName & "\Profiles\TSProfile"
usr.Properties("TerminalServicesHomeDirectory").Value = "\\srv\users\" & strUserName
usr.Properties("TerminalServicesHomeDrive").Value = "M:"
Dim flags AsInteger = usr.Properties("userAccountControl").Value
usr.Properties("userAccountControl").Value = flags Xor &H2
usr.Invoke("SetPassword", NewObject() {"password"}
usr.CommitChanges()
I cannot find where or how to do this from vb.net.
I can create the user, mailbox and add the user to all the groups they need to be in, but I don't know how to add information to the Terminal Services Tab.
All of this works except for the terminal services stuff.
Dim ou AsNew DirectoryEntry("LDAP://" & strLDAP)
usr = ou.Children.Add("CN=" & strCN, "user")
usr.Properties("samAccountName").Value = strUserName
usr.CommitChanges()
usr.Properties("sn").Value = strLastName
usr.Properties("givenName").Value = strFirstName
usr.Properties("displayName").Value = strDisplayName
usr.Properties("description").Value = strJobTitle
usr.Properties("pwdLastSet").Value = 0
usr.Properties("TerminalServicesProfilePath").Value = "\\srv\Profiles$\" & strUserName & "\Profiles\TSProfile"
usr.Properties("TerminalServicesHomeDirectory").Value = "\\srv\users\" & strUserName
usr.Properties("TerminalServicesHomeDrive").Value = "M:"
Dim flags AsInteger = usr.Properties("userAccountControl").Value
usr.Properties("userAccountControl").Value = flags Xor &H2
usr.Invoke("SetPassword", NewObject() {"password"}
usr.CommitChanges()