Hi,
I have the following script to change the Terminal Services Profile Paths for all members of a specific AD security Group. Problem is that it doesn't work. The script doesn't error and executes succesfully but the TS profile Path still will not change. I am new to VBScript and would appreciate if anyone could take a look at the script and let me know what could be wrong with it.
Set cn = Getobject("LDAP://cn=test group,ou=security Groups,ou=CCC,ou=DA,dc=uk,dc=ccc,dc=mydomain,dc=co,dc=uk")
For each obj in cn
if obj.TerminalServicesProfilePath = "\\ukcsql02\ts_profiles\" & obj.cn Then
obj.TerminalServicesProfilePath = "\\ukcsql02\ts_profiles\Optika\" & obj.cn
obj.setinfo
end if
next
I have the following script to change the Terminal Services Profile Paths for all members of a specific AD security Group. Problem is that it doesn't work. The script doesn't error and executes succesfully but the TS profile Path still will not change. I am new to VBScript and would appreciate if anyone could take a look at the script and let me know what could be wrong with it.
Set cn = Getobject("LDAP://cn=test group,ou=security Groups,ou=CCC,ou=DA,dc=uk,dc=ccc,dc=mydomain,dc=co,dc=uk")
For each obj in cn
if obj.TerminalServicesProfilePath = "\\ukcsql02\ts_profiles\" & obj.cn Then
obj.TerminalServicesProfilePath = "\\ukcsql02\ts_profiles\Optika\" & obj.cn
obj.setinfo
end if
next