Rdp, connects a specifi user

Hey,

I want to write a c# program that runs a loop 5 times.

In that loop there will be the cmd

mstsc.exe <user> <password> <starting function>

meaning connecting 5 remote sessions and fire up a starting function in each of them as specified.



I couldn't see such an option in the mstsc.exe (init rdp from the command line) syntax

Does someone know how to do it?
1 answer Last reply
More about connects specifi user
  1. I don't think it is possible because people would do something like this:
    
    open PASS_FILE,"<", "passwords.txt" or die $!;
    $passwd = <PASS_FILE>;
    $loopy = @passwd
    for($i=0; $i<$loopy; $i++) {
     system("mstsc.exe Administrator $passwd[$i]);
    }
    


    It can be done with Automate, though.

    P.S. Sorry, I suck at PERL so please forgive all the errors in example.
Ask a new question

Read More

Programming C# Command Line Apps