Pages

Tuesday, 6 March 2012

How to log off remote desktop users from a remote machine ?

When you try to log on to a  remote server on emergency to perform some task , it may throw an error "The terminal server has exceeded the maximum number of allowed connection". In many servers you may not have the rights to log on with /console or /admin option. I have faced this issue many times and the only option is to get the help from infrastructure team to log off users from the server.

I was searching for a solution for this and found  an option to log off the remote desktop users from  another machine (in the same domain) through command line. The first step to achieve is to list the current  log on session on the remote computer. For that we can use following command from the command prompt. Replace the xx.xx.xx.xxx with your server IP address.

C:\>quser /SERVER: xx.xx.xx.xxx


This will list the current log on session. Please find below screenshot. I have removed the IP address and log in name from the screenshot. You can see the session ID 0,1 and 2 for three available sessions. This is the ID which we will be using in our next step to log off user.







To log off session listed in the previous step, use the following command.Here I am trying to log off the session 0

C:\> logoff /SERVER:xx.xx.xx.xxx 0 /V 














Now you will be able to do the remote desktop to the server.





13 comments:

  1. Thank you very much.

    ReplyDelete
  2. Great! Thanks!

    ReplyDelete
  3. Thank you, very helpful! :)

    ReplyDelete
  4. How we can add a warning message for remote users before they loggoff?

    ReplyDelete
    Replies
    1. shutdown /I will open a GUI that allows for this.

      Delete
  5. Thank you very much

    ReplyDelete

  6. imo install
    imo beta
    imo messenger
    imo online
    I loved the way you discuss the topic great work thanks for the share.

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. من اهم مناطق المملكة ولا بد ان تكون خدمات التنظيف ونقل الاثاث في الرياض على مستوى لائق باهل العاصمة ونقدم لكم اقوىشركات نقل العفش بالرياض المضمونة وتقدم خدمات رائعة وتستخدم سيارات نقل عفش مخصصة ومبطنة من الداخل وايضا تجد خدمات التنظيف للمنازل والفلل والشقق في افضل شركة تنظيف منازل بالرياض رخيصة وتمتلك خبرة طويلة في اعمال تنظيف الشقق والفلل والقصور وجلي وتلميع جميع انواع البلاط ونقدم ايضا خدمات تنظيف المنازل بالبخار في الرياض تحت اسم اكبر شركة تنظيف سجاد بالرياض آمنة بهدف الحصول على تنظيف منزلي شامل للارضيات والشبابيك والمفروشات كالكنب والمجالس والموكيت والسجاد وقد تحتاج ايضا الى تنظيف خزان المياه خاصتك وذلك بالتعاقد مع ارخص شركه نظافة خزانات بالرياض مجربة لخدمات تنظيف وتعقيم وصيانة لخزان الماء خاصتك وعمل تعقيم للخزان الأرضي والعلوي ولا بد ايضا ان تهتم بتنظيف المنزل من الحشرات مع افضل شركه مكافحه بق الفراش بالرياض مضمونة لتعقيم المنزل او المسجد والتخلص من الحشرات المزعجة

    ReplyDelete
  9. The Collection Marts is platform where you can view latest designs about home décor and bedding. We have large range in different categories with finest fabric in cotton and silk. You can view not only present trends but also view huge collection with reasonable price. The Collection Marts can provide fast service about delivery as well as customer support too. Our products are not only self-made but also, well connected with markets to ensure for possibility of available designs if client want to purchase. The Collection Marts customer support open 24/7 to guide their customers about material or product stuff. 4ocean bracelet germany , 4ocean bracelet usa

    ReplyDelete
  10. This was a fantastic read! It offered a lot of useful information. Thanks for making this topic clearer! best seo services in gwalior

    ReplyDelete
  11. Impressive work! The way you supported your points with practical examples was incredibly helpful. Keep delivering such quality content! Luxury Property in gwalior

    ReplyDelete