Hi, "Net user /domain" produces a 3 column output, which is useless for anything else. "For /f " is basically a record/delimited field command. The default delimiter is a space/tab. "Tokens" are fields in a record. "for /f "tokens=1,2,3" means grab the first 3 fields, which translates to 3 columns. Then append each field individually to the output. So the command turns a 3 column output into a single column output. By adding "skip=6" the command dumps the first 6 lines of the "net use /domain" output which just consists of headers etc. I got into the habit of using %i as my first variable tag (leftover from my unix days), which means field 1 is assigned to %i, field 2 to %j and field 3 to %k. Could just as easily have used %a, %b and %c. regards, Rick Ulrich Mack Volante Systems Ltd 18 Heussler Terrace, Milton 4064 Queensland Australia. Ph: +61 7 3246 7704 email: rmack@xxxxxxxxxxxxxx web: www.volante.com.au -----Original Message----- From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Jonathan Kadoo Sent: Thursday, 26 August 2004 3:42 AM To: thin@xxxxxxxxxxxxx Subject: [THIN] Re: ts profile setting Thanks for this script, this is awesome. I was wondering why though in the first line you have %i and %j and %k. do you need all 3???? Rick Mack <Rick.Mack@xxxxxxxxxxxxxx> wrote: Hi, If you want to find out what users have a TS profile defined, tscmd will do this for you. Just generate a list of domain users: for /f "tokens=1,2,3 skip=6" %i in ('net user /domain') do @echo %i >> users.txt & @echo %j >> users.txt & @echo <mailto:&@echo> %k >> users.txt There will be a couple of lines to delete at the end of users.txt snd then its useable. Now use tscmd to list all the users TS profile directories. for /f %i in (users.txt) do @echo %i >> profiles.txt & tscmd \\you_domain_controller <file://you_domain_controller/> %i TerminalServerProfilePath >> profiles.txt Should be doing this with ADSI scripting, but this is easier ;-) regards, Rick Ulrich Mack Volante Systems Ltd 18 Heussler Terrace, Milton 4064 Queensland Australia. Ph: +61 7 3246 7704 email: rmack@xxxxxxxxxxxxxx web: www.volante.com.au -----Original Message----- From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Jonathan Kadoo Sent: Wednesday, 25 August 2004 1:27 AM To: Thinlist Subject: [THIN] ts profile setting We are in the process of migration our users from an old citrix farm to a new one. This move requires us to move their profiles as well. The problem is that I don't have a list of remote access users. I am trying to find a way to determine in our AD who has their ts profile set and where it is set to. I have tried the ldifde tool but it only gives me their profile path not their ts profile path. Any suggestions on how I can get this info? thanks Jonathan ________________________________ This e-mail, including all attachments, may be confidential or privileged. Confidentiality or privilege is not waived or lost because this email has been sent to you in error. If you are not the intended recipient any use, disclosure or copying of this email is prohibited. If you have received it in error please notify the sender immediately by reply email and destroy all copies of this email and any attachments. All liability for direct and indirect loss arising from this email and any attachments is hereby disclaimed to the extent permitted by law. ________________________________ ##################################################################################### This e-mail, including all attachments, may be confidential or privileged. Confidentiality or privilege is not waived or lost because this email has been sent to you in error. If you are not the intended recipient any use, disclosure or copying of this email is prohibited. If you have received it in error please notify the sender immediately by reply email and destroy all copies of this email and any attachments. All liability for direct and indirect loss arising from this email and any attachments is hereby disclaimed to the extent permitted by law. #####################################################################################