Get tscon.exe to work via RDP on remote machine as a non-Admin

Discussion in 'alt.windows7.general' started by tr99, Apr 27, 2016.

  1. tr99


    Apr 27, 2016
    Likes Received:

    My goal is to restore a remote desktop to the local console so that the user doesn't have to re-enter their password and log back in. While connected remotely to a Windows 7 machine via RDP, I run the following command in a batch file:
    tscon %sessionname% /dest:console

    This works fine if I connect via RDP with an account in the Administrators group. The problem is when I RDP to the remote machine with an account that's not in the Administrators group, I get the following error:

    Could not connect sessionID 1 to sessionname console, Error code 5
    Error [5]:Access is denied.

    The batch file needs to be run as an Administrator for it to work. I don't have the Administrator account password, but I do have credentials for an account that is in the Administrators group on the machine. I've tried a few different things to run the batch file as an Administrator, but I can't get it to work right.

    So my question is how can I get the tscon.exe command to work on this remote machine as a non-Admin?

    Any suggestions would be greatly appreciated. Thanks.
    tr99, Apr 27, 2016
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.