PSM: Live Session Monitoring fails with "The privileged session could not be established securely" when using Domain Accounts due to AppLocker
Symptom
- When a user clicks "Monitor" in the PVWA, the session hangs for 15-40 seconds and eventually disconnects with the error: "The privileged session could not be established securely."
- The PSMTrace.log shows the following error during the session initialization phase: PSMSC001E Session common exception occurred. PSMSC036E No Process was found for image [PSMInitSession.exe]
- The Windows Event Viewer (AppLocker EXE and DLL log) may show PSMInitSession.exe or mstsc.exe being blocked.
Environment
14.6 Privileged Access Manager (PAM, self-hosted) PSM
- PSM Live Session Monitoring/Termination
- Privileged Session Manager (PSM)
- PSM servers configured to use Active Directory Domain Accounts for
PSMConnectandPSMAdminConnect(typically used in load-balanced or RDS Per-User CAL environments).
Cause
By default, the PSMConfigureAppLocker.ps1 script is hardcoded to apply its allow-list rules to the local PSMConnect and PSMAdminConnect accounts. If you are using domain accounts and run the script without specifying the domain overrides, the script applies the rules to nonexistent local accounts. Consequently, your actual domain PSM users are blocked by AppLocker from launching PSMInitSession.exe in the background.
Resolution
You must run the AppLocker configuration script using the command-line parameters specifically designed to inject your domain users into the XML rules.
- Open an administrative PowerShell prompt on the PSM server.
- Navigate to the Hardening folder: cd "C:\Program Files (x86)\CyberArk\PSM\Hardening"
- Run the script with your specific domain and usernames:
.\PSMConfigureAppLocker.ps1 -connectionUserName "PSMConnect_p01" -connectionUserDomain "YOURDOMAIN" -connectionAdminUserName "PSMAdminConnect_p01" -connectionAdminUserDomain "YOURDOMAIN"
(Note: Replace PSMConnect_p01, PSMAdminConnect_p01, and YOURDOMAIN with the actual account names and NetBIOS domain name used in your environment).
4.Once the script completes successfully, restart the Idira Privileged Session Manager service.