I want to use mstsc /admin
to login to a server silently. My batch file reads the code as
mstsc /v:xxx.xxx.xxx.xxx /admin
But it ask me to enter password. Can anyone help me to skip this step?
I went on to Google and found this site. But I am very new to this stuff (scripting) and could not understand what to do with given code. Is it a vbscript
file? Can I do the same thing with a batch file. Please elaborate and I request you to spoon feed. This is not my arena but still I am pushed to fight without weapons.
My basic need is to kick off all users from a remote desktop except mine to perform some maintainable work. Thanks.
three users can only take RDP by typing "mstsc /admin" in RUN and others by typing "mstsc" in RUN. all the users will use RDP at the same time. Issue here is only two users can login by typing 'mstsc /admin' in run at the same time.
When you use this switch with MSTSC, connections don't consume Terminal Services CALs. The /admin switch involves elevated rights. If a user has the authority to use the /admin switch but has been marked with Deny Users Permissions To Log On To Terminal Server, he or she will be able to connect using mstsc /admin.
If you get Your credentials did not work or your username or password is incorrect for Remote Desktop error, you need to run the Network Adapter Troubleshooter, change your username, etc. Other than these, you can add Remove Desktop Users in the Allow log on through Remote Desktop Services menu as well.
Re-posted as an answer: Found an alternative (Tested in Win8):
cmdkey /generic:"<server>" /user:"<user>" /pass:"<pass>"
Run that and if you run:
mstsc /v:<server>
You should not get an authentication prompt.
the command posted by Milad and Sandy did not work for me with mstsc. i had to add TERMSRV to the /generic switch. i found this information here: https://gist.github.com/jdforsythe/48a022ee22c8ec912b7e
cmdkey /generic:TERMSRV/<server> /user:<username> /pass:<password>
i could then use mstsc /v:<server>
without getting prompted for the login.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With