ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Add a User to Remote Desktop Users in Windows Remotely

    IT Discussion
    windows rdp remote desktop psexec windows server cmd sysinternals
    3
    7
    7.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by scottalanmiller

      It seems relatively common that I have to work in a Windows environment where I have proper admin credentials, and have access to a workstation in the environment, but cannot remotely access a server (or sometimes another workstation) in the environment because no tools have been configured to access it and RDP has not been set up. In many cases you can solve this issue with psexec.

      Adding the User to the Remote Desktop Users Localgroup with CMD and PsExec

      First, download and install the latest PsExec from Sysinternals.

      Then open the command prompt and run this command (substitute the name or IP address of the machine that you want to be able to access remotely.) Also change the name from administrator to whatever account is appropriate for your environment. This guide assumes that you are logged in with an account that has proper access for this command.

      psexec \\yourservername net localgroup "remote desktop users" /add administrator
      

      If the only issue was that RDP was set up, but not permissioned for your user account, this should resolve that. This is one that I need relatively often when beginning to manage a new account.


      You can also do the same process, but interactively, which is far less efficient, but still valid, using the same tools.

      psexec \\yourservername cmd.exe
      

      Then once logged into the remote machine's CMD environment:

      net localgroup "remote desktop users" /add administrator
      
      1 Reply Last reply Reply Quote 3
      • EddieJenningsE
        EddieJennings
        last edited by

        If PowerShell remoting is available you couple possibly use Invoke-Command with Add-LocalGroupMember.

        1 Reply Last reply Reply Quote 3
        • EddieJenningsE
          EddieJennings
          last edited by

          Though I've seen screwiness for using Add-LocalGroupMember to add users to the local administrators group. Unfortunately, at the time I didn't have the time to troubleshoot it. If I can get around to it, I'll see if I can replicate the problem and post about it in this thread.

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @EddieJennings
            last edited by

            @EddieJennings said in Add a User to Remote Desktop Users in Windows Remotely:

            Though I've seen screwiness for using Add-LocalGroupMember to add users to the local administrators group. Unfortunately, at the time I didn't have the time to troubleshoot it. If I can get around to it, I'll see if I can replicate the problem and post about it in this thread.

            When I see the need for this, it is very often is really old, out of date environments where I expect PowerShell to be missing 🙂

            EddieJenningsE 1 Reply Last reply Reply Quote 0
            • EddieJenningsE
              EddieJennings @scottalanmiller
              last edited by

              @scottalanmiller said in Add a User to Remote Desktop Users in Windows Remotely:

              @EddieJennings said in Add a User to Remote Desktop Users in Windows Remotely:

              Though I've seen screwiness for using Add-LocalGroupMember to add users to the local administrators group. Unfortunately, at the time I didn't have the time to troubleshoot it. If I can get around to it, I'll see if I can replicate the problem and post about it in this thread.

              When I see the need for this, it is very often is really old, out of date environments where I expect PowerShell to be missing 🙂

              Or environments where folks that shouldn't need RDP access get to have it ;). I got tired of RDPing to VMs myself just to get to the GUI to add people to either Administrators or Remote Desktop Users; thus, I found the cmdlet.

              But yeah, I want to think that cmdlet came with PowerShell 5, so older systems won't have it.

              1 Reply Last reply Reply Quote 0
              • gjacobseG
                gjacobse
                last edited by

                I seem to remember doing this via ScreenConnect CMD

                I don't recall the syntax at the moment,... but I'm sure it's documented somewhere... while I used CMD, no reason PS won't also work.

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @gjacobse
                  last edited by

                  @gjacobse said in Add a User to Remote Desktop Users in Windows Remotely:

                  I seem to remember doing this via ScreenConnect CMD

                  Only works if SC is installed, which if it was, we'd not need to do it 🙂

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post