Windows

Logging off remote desktop kills user processes

Logging off remote desktop kills user processes

A mistake that is commonly made by Jr. admins is logging off a remote desktop session to a server after initiating a user driven process or program.ย  In seeing this mistake made countless times by admins who just haven’t had that much experience with remote desktop into a server machine or workstation, we wanted to cover a little tutorial about remote desktop and how it works.ย  For the purposes of our post we will be considering and talking about remoting into a server machine, specifically Windows Server 2003.ย  When you remote desktop into a Windows 2003 server machine, you are not taking control of the console session which is the session that you see if you are physically in front of the “monitor” that is connected to the actual server either directly or via a KVM.ย  Also, note this would also be the VMware console also.

If you remote into a Windows 2003 server, you actually have two slots that you can remote into besides the console session.ย  So each of these slots could potentially have different things going on.ย  If you initiate a session in that remote desktop slot, if you “log off” that slot, you essentially kill everything that was initialized for that user.ย  For instance if you start a dos batch file in that session and it is still running, if you log off, it will kill the batch file.ย  If you want to keep the process or program running, then the administrator needs to “disconnect” from the session instead of log off.ย  Disconnecting simply leaves the session running as well as any of the user initialized programs running as well.ย  When you reconnect to that server as the same user, it will pick back up and reconnect you to the point the session was left in.ย  This is not like a hibernate, because the programs are still running, and or doing tasks they were designed to do.ย  An easy way to think about it is it is like getting up from the console and walking away when you disconnect.ย  The server can still be doing things, however, you don’t lose where you are.

With Windows 2008 and R2 this actually behaves differently.ย  When you remote into a Windows 2008 server, you assume the console session and the opposite is true also.ย  So if you log off of the remote session, you will actually log off the console session as well.

In working with a client who was using Windows 2003, an administrator was loading software and right in the middle of the installation, he decided to take a lunch break, logged off the server, and came back an hour later expecting his installation to be finished.ย  However, to his surprise, this was not the case!ย  All who administer or allow administration of server boxes should be aware of the functionality of remote desktop into the various server operating systems as remote desktop functionality can either help or adversely impact your environment.

 

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.