PSM session does not close after logging out of remote machine
119
Created On 11/10/26 10:55 AM - Last Modified 11/10/26 13:02 PM
Symptom
After logging out of the remote machine PSM session, the RDP window does not close. User has to close the window manually.
Environment
11.3;11.4;11.5;11.6;11.7;12.1;12.2;12.6;12.7;13.0 Privileged Access Manager (PAM, self-hosted);Privilege Cloud PSM;Privileged Session Management (PSM) PSM
Cause
Third-party executables are running in the RDP session on the PSM server, preventing it from closing.
Resolution
-
Identify the session ID for the PSM RDP session. To do that, log into PSM server as local administrator while the issue is observed and run the following command in the command prompt window:
C:\Users\Administrator>query session
SESSIONNAME USERNAME ID STATE TYPE DEVICE
rdp-tcp#1 PSMConnect 2 Active -
Identify all processes that run within that session by running query process <session name> command in the same command prompt window. Take the session name from the previous command:
C:\Users\Administrator>query process rdp-tcp#1
USERNAME SESSIONNAME ID PID IMAGE
system rdp-tcp#1 2 1380 csrss.exe
system rdp-tcp#1 2 4280 winlogon.exe
psmconnect rdp-tcp#1 2 148 rdpclip.exe
psmconnect rdp-tcp#1 2 4216 userinit.exe
psmconnect rdp-tcp#1 2 5668 xxxxxxxxx.exe
In this example the process in bold is preventing the session from closing -
Once the process is identified, prevent it from launching within the PSM RDP session
Additional Information
Details
SYMPTOM:After logging out of the remote machine PSM session, the RDP window does not close. User has to close the window manually.
PROBLEM:
Third-party executables are running in the RDP session on the PSM server, preventing it from closing.
SOLUTION:
- Identify the session ID for the PSM RDP session. To do that, log into PSM server as local administrator while the issue is observed and run the following command in the command prompt window:
C:\Users\Administrator>query session
SESSIONNAME USERNAME ID STATE TYPE DEVICE
rdp-tcp#1 PSMConnect 2 Active - Identify all processes that run within that session by running query process <session name> command in the same command prompt window. Take the session name from the previous command:
C:\Users\Administrator>query process rdp-tcp#1
USERNAME SESSIONNAME ID PID IMAGE
system rdp-tcp#1 2 1380 csrss.exe
system rdp-tcp#1 2 4280 winlogon.exe
psmconnect rdp-tcp#1 2 148 rdpclip.exe
psmconnect rdp-tcp#1 2 4216 userinit.exe
psmconnect rdp-tcp#1 2 5668 xxxxxxxxx.exe
In this example the process in bold is preventing the session from closing
- Once the process is identified, prevent it from launching within the PSM RDP session