So beenden Sie die Remote-Desktop-Abmeldung nach dem Schließen der Verbindung

13171
PKSA

Wenn ich die Remote-Desktop-Verbindung (mstsc.exe) verwende, werde ich beim Schließen der Verbindung vom Remote-Computer abgemeldet.

Gibt es eine Möglichkeit, die Abmeldung nach dem Trennen der Verbindung zu beenden?

Auf Client- und Servercomputern wird nur Windows 8 ausgeführt.

Bitte beachte, dass:

tscon.exe RDP-Tcp#1 /dest:console 

gibt diesen Fehler:

Sessionname RDP-Tcp#1 not found 

Folgendes habe ich auch ohne Erfolg ausprobiert:

tscon.exe 0 /dest:console  tscon.exe 1 /dest:console 
10
Seltsam, es ist mir nie mit Standardeinstellungen für Win 8 oder Win 7 passiert. Solange Sie nicht die Win-Taste drücken und Abmelden drücken, sollte die Sitzung nur geschlossen, aber nicht abgemeldet werden. Ivan Viktorovic vor 8 Jahren 0
Ich habe eine Verbindung mit dem Remote-Computer hergestellt und bringe die Remote-Verbindung wieder her. Ich möchte, dass der Remote-Computer nicht abgemeldet wird PKSA vor 8 Jahren 0
Die Sache ist, dass der entfernte Benutzer abgemeldet wird, wenn Sie sich anmelden. Wenn Sie die Verbindung einfach schließen, wird der vorherige Benutzer nicht wiederhergestellt. Ich würde auch gerne einen Workaround dafür finden. Tetsujin vor 8 Jahren 0
Ja, das ist richtig, solange Sie zwei verschiedene Benutzer verwenden. Wenn es gleich ist, dauert es nur diese Sitzung. Sie benötigen einen Terminalserver oder eine Serverversion, wenn Sie mehrere Sitzungen mit demselben Benutzer wünschen Ivan Viktorovic vor 8 Jahren 0
Ich melde mich beim aktuell aktiven Benutzer an. Es zeigt ihnen immer noch den Sperrbildschirm an, sobald ich mich einlogge. Auf 2 Kompositionen physisch nebeneinander getestet, so ist die visuelle Untersuchung von beiden Seiten einfach. Dies ist seit möglicherweise XP, auf jeden Fall 7 und fährt mit 10 fort. Ich würde es sehr gerne interaktiv tun können, wie ich es mit Apples Remote Desktop oder sogar TeamViewer tun kann. Tetsujin vor 8 Jahren 0
Neugierig zu wissen, welchen Fehler Ihnen diese beiden Befehle geben (tscon.exe 0 / dest: console tscon.exe 1 / dest: console), da ich dies täglich verwende. IronWilliamCash vor 7 Jahren 0

3 Antworten auf die Frage

5
Pimp Juice IT

Okay, so a few things after reading your question and some of the comments and your comments back and forth to and from others. I'm going to post some details and then a potential solution at the bottom that I've confirmed worked fine in a test/lab environment a while back, but I encourage you to read over my answer entirely as there are some gotchas, etc.

  1. How to stop remote desktop logoff after closing the connection

    For this question above, others have answered and suggested the GPO settings (idle and disconnected session time limits to unlimited) to look over and ensuring that the user disconnects rather than logoff.

  2. I am logging to the currently active user. It still presents them with the lock-screen as soon as I log in. Tested on 2 comps physically next to each other, so visual examination from both sides is simple. This has been since possibly XP, definitely 7 & continues on 10. I'd love to be able to do it interactively, like I can with Apple's Remote Desktop or even TeamViewer.

    a. Using TeamViewer on Windows will still not allow multiple or concurrent RDP sessions on a Windows non-Server OS. It will allow you to interact with currently exisitng RDP sessions or active console sessions only so if you do not have more than one of those to connect to for interacting with, it'll not give you the expected result.

    b. Microsoft sells Server OSes and Client Access Licenses for Terminal Server access with a cost associated per user or per device CAL as I've seen others mention in comments, answers, etc. So for Microsoft non-Server OSes, they leave this Terminal Server RDP expanded functionality not enabled or disabled for that reason for one.

    c. Microsoft Server OSes usually can handle more concurrent sessions more effecient on the same machine with more memory support, and not having as much (non-Server bloatware type) Microsoft built-in features and functions enabled by default as non-Server OSes may have to ensure optimum performance so these unnecessary things just don't run. On a home PC more people may legitimately use these features and find them more useful than on a server in this type of environment for non-home (or client workstation) usage. On a server though, these may not be needed as much so I'd consider these bloatware more in the server OS context just to clarify what I mean here by the term "bloatware" in this particular instance.


The Potential Workaround

Warning: I'd suggest doing this in only a test or lab environment for testing purposes only a I'd never suggest using it for production purposes in a business environment. Otherwise, use with caution at your own risk as I have no idea about the legalities of usign this long-term otherwise for production purposes, etc.

Below is a link to a source called RDPWrap that's on GITHub that's a free download. They've posted full instructions with screen shots, etc. on the site with step-by-step detail so it shouldn't be too difficult to figure out.

To download what you'll need that's the actual install file rather than the non-compiled source code, from the below link named RDPWrap Install File Download Link in the in the Download section of that page, click on the link named RDPWrap-v1.6.zip to download the EXE and batch install files, etc. contained within this ZIP file (see below screen shot).

Gotchas

If you apply Windows Updates on one of your test machines and this functionality ends up not working afterwards, you may need to run the install again to patch over the files, etc. You may also need to check the source GITHub resources for other bug patches, etc. with new releases since this is something someone else provides.


Important: Domain level Group Policy and/or Security Policy settings may override all the below listed local Registry, local Group Policy, and local Security Policy settings. From what I can tell but not confirm myself, ensuring these settings are set as specified will prevent disconnected RDP sessions from being logged off after a certain period of time. You may need to reboot the machine after making any local settings changed below for those to become effective. You may need to check for domain level Group Policy or Security Policy settings that take precedence over the local settings if you still have trouble after ensuring these settings are set locally per machine.



Concurrent RDP Session Same User Account Registry Values

Change these registry values as shown in the screen shot to enable or disable the ability to allow more than one concurrent RDP session with the SAME account. You'll need to change and/or create this key manually perhaps and set per each run of the RDPWrap patch software on your test systems.

To change this setting, you'll need to perform a registry change. The following steps describe the process:

  1. Start Registry Editor (by default, this is located at c:\windows\regedit.exe).
  2. Go to the following registry key:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer

  3. If the fSingleSessionPerUser value doesn't exist, create a new DWORD value named fSingleSessionPerUser

  4. Open the fSingleSessionPerUser value. The possible values for this setting are as follows:

    0x0

    Allow multiple sessions per user

    0x1

    Force each user to a single session

  5. Enter the new setting, and then click OK.


Ensure Disconnected RDP Sessions aren't Logged Off Automatically

A. From GPEDIT.MSC ALL the below settings in both Computer Configuration and User Configuration need to be set to a State of Not configured.

These Group Policy settings are located in the following locations:

  • Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits
  • User Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits

enter image description here


From Community Spiceworks Comment

B. From SECPOL.MSC the below (screen shot highlighted) setting in Interactive logon: Do not require CTRL+ALT+DEL needs to be set to a Enabled.

1. Local Policies\Security Options

enter image description here


Download Link Screen Shot

enter image description here


Sources:

Beeindruckend! Großes Detail. Lass mich das morgen aufnehmen [etwas spät hier] und ich werde dich wissen lassen. Vielen Dank, dass Sie sich so viel Zeit für diese Zeit genommen haben. Tetsujin vor 8 Jahren 1
Es ist großartig, dass mehrere Personen darauf zugreifen können, ohne sich zu trennen. PKSA vor 8 Jahren 0
Aber ich brauche, wenn ich auf Schließen klicke, darf sich das System nicht abmelden. Aber es meldet sich ab. PKSA vor 8 Jahren 0
@LMFAO_A_JOKE Ich habe es versucht, aber es hat mein Problem nicht wirklich gelöst. Es erlaubt einer Maschine, zwei Verbindungen herzustellen, aber sie können nicht dieselbe Seite sehen, wie wir es in TeamViewer oder VNC usw. tun können. Außerdem bestand mein Problem darin, dass ich der einzige war, der an der Maschine angemeldet war und ich meine RDC-Maschine vom Computer trenne Maschine sollte sich nicht abmelden PKSA vor 8 Jahren 0
@PKSA Okay, so hat Microsoft die RDP-Funktion so konzipiert, dass sie leider verwendet werden kann. Wenn Sie also die native Windows-RDP-Funktion verwenden, können Sie meines Wissens nach keine Bildschirmfreigabe durchführen. Diese Lösung ermöglicht mehrere gleichzeitige RDP-Sitzungen von denselben oder separaten Benutzerkonten, ohne dass andere abgeschaltet werden. Das Desktop-Windows-Betriebssystem verhält sich daher im Wesentlichen wie ein Terminalserver mit anwendbaren Richtlinien. Sind PKSA und Tetsujin also dieselbe Person oder was? Ich bin mir nicht sicher, warum ich das im Januar 2016 nicht gesehen oder nicht beantwortet habe, aber da haben Sie es. Pimp Juice IT vor 6 Jahren 0
Ich habe ein Problem mit Google Cloud VM. Ich möchte, dass der Desktop auch ohne RDP läuft, das mit der VM verbunden ist (also kann ich Desktop-Anwendungen starten). Wird einer dieser Helfer helfen? Royi vor 6 Jahren 0
Ich möchte ein Programm mit UI starten, ohne RDP zu verwenden. Royi vor 6 Jahren 0
@Royi Und ich vermute, diese Benutzeroberfläche hat kein gleichwertiges CLI, das Sie schreiben könnten, richtig? In der Vergangenheit war ich mit solchen Operationen mit AutoIT erfolgreich, wo es mit CLI oder anderen Anwendungsskripten absolut keine andere Möglichkeit gab. Welches Programm ist es zufällig, ein branchenübliches Standardprogramm oder vielleicht eine benutzerdefinierte App oder etwas? Haben Sie schon einmal die KOSTENLOSE Software [AutoIT] (https://www.autoitscript.com/site/autoit/) verwendet? Pimp Juice IT vor 6 Jahren 0
1
Fazer87

Dies kann durch Gruppenrichtlinien oder lokale Sicherheitsrichtlinien auf Ihrem lokalen Computer verursacht werden. Die Schritte zur Behebung dieses Problems sind in beiden Fällen ähnlich:

  • Starten Sie den lokalen Gruppenrichtlinien-Editor: https://technet.microsoft.com/de-de/library/cc754685.aspx (Start> Suchfeld> gpedit.msc). (Für Domänenbenutzer starten Sie die Gruppenrichtlinienverwaltung und navigieren zu Ihren Servern OU und bearbeiten Sie das Gruppenrichtlinienobjekt

  • Wechseln Sie zu der folgenden GP-Einstellung: Computerkonfiguration> Administrative Vorlagen> Windows-Komponenten> Remotedesktopdienste> Remotedesktop-Sitzungshost> Sitzungszeitlimits. Stellen Sie in diesem Fall sicher, dass Sie die Sitzungszeitlimits für freie und unbegrenzte Sitzungen auf unbegrenzt festgelegt haben.

Starten Sie Ihre Maschinen neu.

Versuchen Sie, dies auf beiden PCs durchzuführen (höchstwahrscheinlich auf dem Computer, für den Sie RDP verwenden) und sehen Sie, wie Sie vorankommen.

1
Rohan Gala

To disconnect without ending your Remote Desktop session You can temporarily disconnect from a session by clicking the Close button on the connection bar (the horizontal bar at the top of your screen). This leaves your programs running so that, next time you connect, you can continue where you left off.

Even this may help https://technet.microsoft.com/en-in/library/cc754272.aspx

Ich fange an zu glauben, ich hätte die falsche Frage wirklich belohnt. Mein Hauptproblem ist, dass der Benutzer am anderen Ende abgemeldet ist. Ich kann innerhalb einer Sekunde eine neue Verbindung aus meiner Sammlung von "Lesezeichen" herstellen, aber der andere Benutzer muss nur auf einen Anmeldebildschirm blicken, während ich anwesend bin und auch nicht wirklich weiß, wann ich fertig bin. Ich bin fast versucht, einfach zu TeamViewer zu wechseln, wenn RDC das nicht kann :( Tetsujin vor 8 Jahren 0