I would be able to run powershell scripts when users disconnect or reconnect to their RDS/Citrix session.
The scripts must run from the session, with user privileges and environment vars.
I was using a small Citrix utility named Session State Monitor Tool, but this tool is no more supported and not always reliable.
Is there a Windows event, another tool or a Powershell command I could use ?