Hello my dear experts,
I use this script to fill the "Log on To" field on AD:
Set objUser = GetObject _
("LDAP://cn=user (USR),ou=3rd OU,ou=2nd,ou=1st ou,dc=bpco,dc=com")
objUser.Put "userWorkstations", "A,B,C,D,E"
objUser.SetInfo
Because of frequent changes inside the net, a very cool improvement will be to be able to use this same script, but allowing to pull the userWorkstations from a file text with a pre-defined computer ser list
Can you help me?
Hey,
Should be pretty straight-forward.
Const WORKSTATION_FILE = "TheList.txt"
Dim objFSO : Set objFSO = CreateObject("Scripting.Fi
Dim objFile : Set objFile = objFSO.OpenTextFile(WORKST
strWorkstations = objFile.ReadAll()
Now it's just down to how you want the file to be formatted. If it's just a list it can be popped straight in:
Set objUser = GetObject _
("LDAP://cn=user (USR),ou=3rd OU,ou=2nd,ou=1st ou,dc=bpco,dc=com")
objUser.Put "userWorkstations", strWorkstations
objUser.SetInfo
Where the list in the file would be:
workstation1,workstation2,
Chris