Friday, September 14, 2012

Remote Enable Remote Desktop


src: http://oreilly.com/windows/archive/server-hacks-remote-desktop.html

Remote Desktop is a cool feature of Windows Server 2003 that lets you remotely log on to and work at a machine as if you were seated at the local console (in Windows 2000 Advanced Server, this feature was called Terminal Services in Remote Administration Mode). Remote Desktop can be a lifesaver for fixing problems on servers at remote sites, but what if you forgot to enable the feature before you shipped the server out to Kalamazoo? Enabling Remote Desktop is easy if the server is in front of you: just log on as an administrator, open System in Control Panel, select the Remote tab, and under Remote Desktop select the checkbox labeled "Allow users to connect remotely to this computer." Unfortunately, you can't use the System utility to enable Remote Desktop on a remote machine, though you can access some properties pages of System using Computer Management by first connecting the console to a remote computer, then right-clicking on the root node and selecting Properties. Unfortunately, as you can see in Figure 1 below, the Remote tab is not available when you access System properties this way on a remote machine (here named SRV220).
Figure 1
Figure 1. System properties for a remote machine does not have Remote tab.
Fortunately, there's a workaround. Sit down at your desk and log on to your Windows XP workstation using your administrator credentials and start Registry Editor by Start --> Run --> regedit --> OK. Then select the Connect Network Registry option under the File menu (Figure 2).
Figure 2
Figure 2. Connecting to the Registry on a remote machine.
This opens the Select Computer search box. Either browse Active Directory to locate the remote server, or type its name in the textbox (Figure 3).
Figure 3
Figure 3. Connecting to the Registry on a remote server named SRV220.
Click OK and a node will be displayed in Registry Editor for the remote machine (Figure 4).
Figure 4
Figure 4. HKLM and HKU hives on SRV220.
Now browse HKLM on SRV to find the following Registry key (Figure 5).
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server
Figure 5
Figure 5. Registry key for Terminal Server on remote machine.
Under the Terminal Server key, you'll find a REG_DWORD value named fDenyTSConnection. Double-click on that value to open the Edit DWORD Value box and change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled), as in Figure 6 below.
Figure 6
Figure 6. Set fDenyTSConnections to 0 to enable Remote Desktop on SRV220.
The remote machine needs to be rebooted for the change to take effect, so open a command prompt and type the following command:
shutdown -m \\srv220 -r
After the remote machine reboots, Remote Desktop should be enabled on it. To test this from your workstation, open Start --> All Programs --> Accessories --> Communications --> Remote Desktop Connection, enter the name of the remote server in the Remote Desktop Connection logon box, supply your administrator password when prompted, and you're in.
Mitch Tulloch is the author of Windows 2000 Administration in a Nutshell, Windows Server 2003 in a Nutshell, and Windows Server Hacks.

Return to WindowsDevCenter.com.

Comments on this article
Full Threads Oldest First
Showing messages 1 through 59 of 59.
  • add user remotely
    2010-06-16 19:41:02  acharjee [View]

    hi everyone

    I wants to add user remotely. how can i be.

    thanks
  • Great post... It just save me today 12/24/2009
    2009-12-24 07:04:32  Ricardo Fuentes [View]

    THanks man... great post.
  • How To HAck A Windows Server2003
    2009-08-04 21:50:41  Srijon [View]

    Hi, Do any one knows how to hack in to a windows server 2003 using remote desktop connection??

    Please let me know.

    My email Address is srijon0088@gmail.com

    Thank You.
  • Windows Server 2003 Admin Pasword disabled
    2009-07-09 09:13:37  Le Censeur [View]

    I disabled admin password on my home server and created another admin account. But the new account cannot enabled back my admin account. What should I do? How can I gat that admin account back without reinstalling.
    Thanks,
    Le Censeur
    • Windows Server 2003 Admin Pasword disabled
      2010-01-15 05:09:08  walled [View]

      how to loca user get the admin password
      • Windows Server 2003 Admin Pasword disabled
        2010-06-03 11:28:42  Heartbeat1983 [View]

        Use this link to enable your Account..
        http://pogostick.net/~pnh/ntpasswd/
  • Remote Desktop and viewing programs
    2008-07-16 13:37:30  ludovici [View]

    I normally use remote desktop to administer a stack of servers, and I've noted with much frustration there are some applications, services and whatnot that I simply cannot see when I run them through remote desktop, and it seems arbitrary. I use NOD32 for example, on all my servers, yet there are some that I see the icon in the system tray and can open it up, and there are others where I can verify it's running through task manager but cannot see it in the systray or open it up. What's the secret here? Is there some special settings that will allow viewing of everything?

    Thanks in advance....
    • Remote Desktop and viewing programs
      2008-09-02 17:03:03  Grasfairy3 [View]

      The issue is most likely that you are not RDPing into the "console" session (technically session 0). If you add use something like the /console switch(or /admin if you have the new version of RDP, I think it would be RDP version 6) you should then be able to see all of your icons. If you want the full command, I tend to use: mstsc /v:x.x.x.x /console (for new RDP it would be the same but again, replace the /console with /admin. The console session does not really technically exist anymore in Server 2008). This should allow you to now see all of your icons! (I had this same issue in the past :)~ )
  • terminal conncection for more than 3 users
    2008-04-16 22:09:36  p_R_a_S_u [View]

    Hi How I hav a win3k system with remote desktop enabled. But not ably to logon morethan 3 users at a time. Is there any solution? Kindly let me know.
    • terminal conncection for more than 3 users
      2008-10-08 10:08:01  pashu [View]

      i have to cerate terminal server with number of connection . can u help me about this topic
  • Re-establish a prior connection
    2008-04-03 09:41:19  zcountezza [View]

    Yesterday, I remotely logged into my Windows 2003 server. I mapped and opened a network drive, then set up and started some eclipse servers. This morning, I logged into this same server from my computer, but I couldn't get the same session. I log into a session where the network drive is disconnected and I can't see any of my command prompts for the running eclipse servers (I know these are still running because I can hit them from my browser). Any suggestions?
  • A tool that does this
    2008-01-25 06:18:06  spastech [View]

    There's a tool called VENM Console that has done this for years. There's info about it at http://www.vncscan.com/terminal_server/Enabling_Remote_Desktop.htm
  • tracking remote desktop users
    2007-04-13 09:57:40  mrahe@datacomspecialists.com [View]

    Is there a way to track remote desktop users? I'd like to see who logged in/out, when, and perhaps from what IP.
    • tracking remote desktop users
      2007-04-24 10:43:27  g_socrates [View]

      You can use tsadmin.exe which will provide the users that are logged in and whether they are are idle, active, or disconnected. 2003 servers do not populate in the list of servers on the network and need to be added manaully for whatever reason. This does not log historical information only active information.
      HTH
  • cannot logon through Terminal Services
    2007-03-19 09:28:26  kskate2 [View]

    I just installed Terminal Services on a W2K3 member server. I am receiving the following error: To log on to this computer, you must be granted the Allow log on through Terminal Services right. By default, members of the Remote Desktop Users group have this right. If you are not a member of the Remote Desktop Users group or another group that has this right, or if the Remote Desktop User group does not have this right, you must be granted this right manually. I have granted a user access to logon on locally and be a member of the local remote desktop users group. Has anyone else has encountered this problem? Any assistance would be greatly appreciated.
    Thanks in advance,
    Kelli

    • cannot logon through Terminal Services
      2008-04-29 07:21:25  Configss [View]

      I was having the same problems and even after allowing permissions in the group policy it didn't work. What finally worked for me was found in the Terminal Services Configuration. There is a connections folder with an RDP-tcp connection in it. Add the permissions here and it should take care of the problem for you.
    • cannot logon through Terminal Services
      2007-03-21 21:24:55  BaYaBasMan [View]

      By default To be able to login to Terminal Service you need to be a member of "Remote Desktop Users" or the "Administrators" group. If you already are try to check the permissions in the terminal services settings. Open Tscc.msc and open the RDP properties under the connections folder. Add your account or group that you want to give access to RDP. Hope this Helps. puking ina mo...
      • cannot logon through Terminal Services
        2008-02-21 05:09:09  Maganti [View]

        even i tried the same by adding group into rdp properties, but no use. help me
  • Thanks!
    2007-03-05 15:19:09  mgustavson [View]

    This worked flawlessly - saved a long trip! Thank you!
  • Remote Desktop access denied
    2007-02-15 07:34:55  Redgeck0 [View]

    On a windows 2003 server, I've tried the remote registry hack and the fDenyTSConnection is already set to 0. I still get "You must be allowed log on through Terminal Services right." This server was built and set for RDC and the admin was placed in the RDC group. Everyone was removed from Deny log on to TS in the group policy.

    Any other ideas?

    Thanks

    Linda
    • Remote Desktop access denied
      2008-01-01 04:18:11  sri_sms [View]

      On a windows 2003 server, I've tried the remote registry hack and the fDenyTSConnection is already set to 0. I still get "You must be allowed log on through Terminal Services right." This server was built and set for RDC and the admin was placed in the RDC group. Everyone was removed from Deny log on to TS in the group policy.


      • Remote Desktop access denied
        2009-12-24 07:02:54  Ricardo Fuentes [View]

        you are not a local administrator of that computer or you are not uder the Remote Desktop users group..

        :)
      • Remote Desktop access denied
        2008-02-23 22:32:01  Caryb [View]

        HELLO EVERYONE.. I HAVE THE ANSWER!!! After further review (and a lot of trial/error).. In Control panel/Windows Firewall: Exception tab: Enable Remote Desktop. In Advanced: Enable Local area connection, then select 'Settings'. Enable Remote Desktop, and also, enable HTTP. (Http will allow you to web interface a remote desktop, but must be enabled elsewhere if you wish to use this feature.. neat!) Drop me an e-mail if you want to use web remote desktop. WORKS GREAT!! cbudach@yahoo.com
        • Remote Desktop access denied
          2009-06-25 11:33:46  cogtruth [View]

          I would like to use this feature. Where do I enable it?
        • Remote Desktop - Remote user Links??
          2008-09-30 14:14:37  CarolCampbell [View]

          Subject probably well out of date but only just found this site and need HELP!! I am a remote desktop user which links to a server in the North of England. No problems until recently. Now it allows the connection when I enter my user name and password, BUT then the links will not work - a 'hand' overs over the icon, but the normal mouse click will not activate it. It has been tested by the host site and works fine, so problem must be with settings on my computer. Can anyone offer not too technical walk through of settings I should check/change? (Have managed to lose system restore points, so can't do anything involving that!) THANK YOU....
      • Remote Desktop access denied
        2008-02-23 22:27:28  Caryb [View]

        HELLO EVERYONE.. I HAVE THE ANSWER!!!
      • Remote Desktop access denied
        2008-02-23 22:27:27  Caryb [View]

        HELLO EVERYONE.. I HAVE THE ANSWER!!!
    • Remote Desktop access denied
      2007-02-28 13:29:39  Alexjaya [View]

      Do you have permission to logon locally. Try adding yourself to the local admini group and see if it works. if it works then you do not have sufficient privileges. you should be granted permission to logon locally in the local policy and also be granted permission to RDp-TCP in Terminal Services Configuration.

      thanks.
  • key problem with Remote Desktop Connection
    2006-12-05 12:02:41  LifeOfReilly [View]

    After successfully making a remote desktop connection (using XP) I sometimes find that the Shift and Ctrl keys no longer work. If I goof around a bit with the Ctrl key on another screen the use of the Shift and Ctrl keys returns. Then after a while they stop working again. This happens quite often and really becomes a nuisance. Any thoughts?
    Thanks
    • key problem with Remote Desktop Connection
      2007-03-14 09:27:48  ernestdcook [View]

      Thank you for your post. I am experiancing a simular issue but I am using Vista to connect to to SBS network over remote desktop. ACK, I can't get anything done this way since even an e-mail needs the shift key to get the @...

      Anybody that knows of a fix for this, please help!
  • easy fix
    2006-11-26 14:34:34  everynameistaken888 [View]

    this tool does it for you and its free. http://www.arconi.com/RDPenable.html
  • Remote computer ending connection
    2006-11-07 00:49:16  JonnyBoyo [View]

    I have a Windows XP Pro laptop and desktop wirelessly networked. I can remote desktop from the desktop to the laptop but not the other way around. In fact on the desktop the option isn't even available for enabling. I tried changing the fDenyTSConnection terminal server key from 1 to 0 and now I don't get the unable to connect error but "The remote computer has ended the connection" comes up immediately. Please can anyone help? Thank you
  • windows server no desktop
    2006-08-02 03:51:16  zack786 [View]

    great info about remote desktop.appreciate any help with my problem too. got windows server 2003 and after running a clean up utility the server doesnt boot to a desktop- blank screen, but users can still access the files.also says at least one service failed to start. any ideas how i can try to fix remotely?
    thanks
  • Try this program - its free and does it all for you
    2006-06-02 04:13:01  empois [View]

    Program to remotely enable or disable remote desktop on a remote computer running Windows XP.

    http://www.lancs.ac.uk/staff/morganpj/Remote_Desktop_Enable.htm
    • Try this program - its free and does it all for you
      2007-04-27 12:19:26  captain817 [View]

      I'd like to try the remote desktop enable program
  • Use PSTools..
    2006-05-25 10:02:09  paul.laudeman [View]

    If you are using PSTools from SysInternals.com you can also execute the following command:

    psexec \\computername/ipip reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0
  • RDP - Get rid of lock screen...?
    2006-05-16 09:28:21  wolfsden3 [View]

    Anyone here know how to not lock the screen on a RDP session...? I'd like to get into the USERS desktop!!! More like a VNC session where they can interact with me on the remote session. Currently, if you RDP to their desktop, it logs them off. Any ideas...?

    Thanks,



    Raf Daddy
    • RDP - Get rid of lock screen...?
      2006-08-18 09:37:49  mdirish [View]

      You're best bet is to use Remote Assistance from the Tools menu on the Help & Support area in XP. You will have to allow remote assistance on the user's machine and you will also have to have the proper permissions to use it but it works well. Remote Assistance is better for several reasons but most importantly you won't need to know the user's password to gain access. They will have to grant you access from their side.

      But, if you don't want to use remote assistance, you can gain access to the user's session of the remote client by using the /console switch in Remote Desktop. The best way to do that is to run a command from the cli.
      Example.

      C:\mstsc.exe /V:COMPUTERNAME /CONSOLE
  • Custom Error Messages in RDP
    2006-04-24 01:54:16  AlanP [View]

    I'm looking for some advice on creating custom error messages to return to RDP clients.

    Remote users accessing Windows XP virtual desktops (running inside VMware virtual machines).

    If there is a problem with the connection - for example no empty virtual machines available to host their session on - we would like to return a more helpful error message rather than the "timeout" error that gets returned by default.

    Can anyone help, or suggest other places to look for help?


    Thanks
  • Software
    2006-04-11 07:35:13  SiliconHacker [View]

    Are there any softwares that decode programs?
  • easier way
    2005-12-07 15:37:52  cking2 [View]

    wmic /node:"Computer Name (FQDN)" RDTOGGLE WHERE ServerName="Computer Name" CALL SetAllowTSConnections 1

    This was added in W2k3 SP1 and works against XP machines but has to be run from a W2k3 SP1 machine. I have not figured out how to add this ability to my XP workstation.
    • easier way
      2006-05-25 18:14:45  dwarfsoft [View]

      For WMIC calls from Windows XP you need the /locale: switch. Windows 2003 defaults /locale to whatever you have installed with (default ms_409).

      I haven't tried toggling this from Windows XP though, and I know there are some commands that will not work from a Windows XP machine, though these have so far been due to restrictions of login details. Using /user: and /password: does not necessarily grant enough permission to shutdown a machine while logged on with low privelages.
    • easier way
      2006-04-24 11:46:11  gwojan [View]

      From Windows XP SP2 try:

      /node:"HOSTNAME" path win32_terminalservicesetting where servername="HOSTNAME" call SetAllowTSConnections 1

      --Greg
  • BSOD when I connect to machine
    2005-10-07 09:38:50  Bond007s [View]

    I recieved a Blue Screen of Death (BSOD) every time I logged in as the Domain Administrator on that machine. The Remotely connected machine (machine using remote Desktop to connect) appears to connect then appears as though the remoted machine was pulled from the Network as the BSOD hits the screen of the remoted machine. I have only modified the one regestry Setting although the BSOD says that there is a Regestry Invalid Error. Can Anyone help me with this problem. I work as a technician for a school district and find Remote Desktop very useful...
  • Remotely Enable Remote Desktop
    2005-04-21 08:42:42  SatKDOT [View]

    Here is a batch file that does the same thing.
    Also works for XP. Save the following as: remoteon.cmd or, whatever you like.

    @echo off
    setlocal
    if {%1}=={} goto syntax
    :loop
    if {%1}=={} goto finish
    set remote="\\%1\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server"
    shift
    reg.exe ADD %remote% /v fDenyTSConnections /t REG_DWORD /d 0 /f>nul 2>&1
    if NOT %ERRORLEVEL% EQU 0 @echo %remote% NOT found.
    goto loop
    :syntax
    @echo Syntax: RemoteDesktop Computer1 [Computer2 .... Computern]
    goto loop
    :finish
    endlocal

    Go to a command prompt and type remoteon computername
    • Remotely Enable Remote Desktop
      2010-04-08 07:58:04  bonedog73 [View]

      Thanks!

      Just used this on a bunch of my domain machines where this wasnt enabled. Noticed I didnt need to reboot to make it work..
    • Remotely Enable Remote Desktop
      2006-03-08 15:47:02  thomas9406 [View]

      This worked great! I used PS Tools to execute the batch file remotely.
      • Remotely Enable Remote Desktop
        2006-03-29 05:51:03  w1nstrel [View]

        Yeah, PSEXEC.EXE is great... In this case, you shouldn't need it, since REG.EXE can write to a remote registry on it's own. The batch script that SatKDOT wrote includes the ability to do it like this: remoteon.cmd <pcname>
  • I was able to do this on one machine, but now I get this error.
    2005-02-10 16:44:23  zxfiles [View]

    "Make sure that this computer is on the network, has remote administration enabled, and that both computers are running the remote registry service."

    Why would this stop? All machines are Windows XP Pro running on a Windows Server 2003 domain controller. The computers are on the network. As far as the other two settings go, how would I verify this? Would it matter than some of these machines used to run Windows 2000 and were upgraded at one time?

    Thanks.
    • I was able to do this on one machine, but now I get this error.
      2005-02-10 16:53:34  zxfiles [View]

      Update:

      I just verified on one machine that the remote registry service is started. But it would not let me connect. Same error message. However, I can already remote desktop into the machine. I was just testing this feature. Any ideas? Something to do with service pack 2's firewall maybe?
      • I was able to do this on one machine, but now I get this error.
        2005-02-10 16:56:36  zxfiles [View]

        Well crap! :) I should comment more often as it helps me fix the problem. Hehe. Apparently File and Print Sharing has to be turned on in the Exceptions for the SP2 firewall. It should have already been turned on I guess for the network, but anyway. I just did it on this test machine and the remote registry connected fine.

        I hope this helps others.
        • I was able to do this on one machine, but now I get this error.
          2006-02-02 04:52:49  mbusor [View]

          i had the same problem the workaround
          -make the user(e.g XP machine) as part of administrators on the remote machine
          it worked for me hope it also does for you.
          good luck
  • Why not make it easier by doing this!!!
    2005-01-27 06:22:16  matty_g [View]

    Use the above info to create a custom adm file, that way it can easily controlled by group policy while doing that though you might as well also include the regkey hack that will allow you to remotely control a machine that has offline files enabled!!!

    Matt
    • Why not make it easier by doing this!!!
      2006-03-29 05:46:15  w1nstrel [View]

      You shouldn't need to make a custom ADM... the stuff to enable RDP per-machine is already in the default ADM templates. ;)
    • Why not make it easier by doing this!!!
      2006-01-25 14:41:46  Phoenix_7 [View]

      Matty_g or Anyone else know where can I find this hack?

      "regkey hack that will allow you to remotely control a machine that has offline files enabled!!!"

      This problem is beginning to pop up on my network more and more everyday.
  • Re: Remotely Enable Remote Desktop
    2004-08-17 04:37:41  EBO [View]

    I get an error : Cannot Open HKEY_LOCAL_MACHINE: errro while opening key

    How can i resolve dat?
    • Re: Remotely Enable Remote Desktop
      2006-11-07 21:11:48  serverguy63 [View]

      Just try getting to it by using the run command and typing "\\systemname\c$" if you cant access it then it's permissions. There's a utility here "http://www.arconi.com/RDPenable.html" that might help you.
    • Re: Remotely Enable Remote Desktop
      2005-03-17 09:26:19  navyjax2 [View]

      This is likely a permissions issue on that key. You need to have admin privileges on the computer you are accessing. As long as you do, you can go and right-click on HKEY_LOCAL_MACHINE, hit Permissions and add the right permissions to your user name (Full Control should do it), go through the Advanced button, go to the Owner tab, take ownership of it, go through the Effective Permissions tab, hit Select and then type in your user name, it should show you your permissions. On the Permissions tab, select your user name and Edit and you can select all the permissions there. You can then hit Apply and OK, then mark the Replace permission entries on all child objects with entries shown here that apply to child objects checkbox and uncheck the Inherit from parent...blah blah blah, so that it will replace those permissions with what you are selecting and not draw them from anything higher. All of that is in no particular order, I just do it until I get it to accept it all. If you can't get it to give you these permissions with all of this, you may not have admin rights or the registry could have some permission corruption.
    • Mitch Tulloch photo Re: Remotely Enable Remote Desktop
      2004-08-17 08:00:57  Mitch Tulloch | O'Reilly Author [View]

      Is the Remote Registry Service enabled on the remote machine?

No comments:

Post a Comment