DrainCtl monitors RDSH drain mode in real time. The moment someone blocks new connections, you know — who did it, when, and how long it's been active.
irm https://lissconsulting.github.io/LISSTech.DrainCtl/install.ps1 | iex
The moment someone runs chglogon /drain, the service knows. No polling delay
— Windows notifies DrainCtl directly through the kernel.
DrainCtl tells you the exact user account that enabled drain mode. Not just that it changed — who did it, and when.
See active and disconnected sessions on every server. Set a capacity threshold and get alerted before your farm runs out of slots.
One page for your entire RDSH farm. Live status, session gauges, state history chart, and event log — secured with Kerberos SSO.
Configure notification targets, grace periods, and alert thresholds once in the dashboard — every agent inherits them. Unlimited webhook and ntfy.sh targets with per-target triggers and repeat intervals.
Every state change logged with timestamps, durations, and attribution. Query it from the CLI, PowerShell, or the dashboard.
12 native cmdlets on PSGallery. Exit codes + JSON for any RMM. Works on PS 5.1 and 7+.
One DNS SRV record and every agent finds the dashboard automatically. Install the MSI, walk away — agents register themselves.
Every binary, DLL, MSI, and PowerShell script signed with an EV certificate. Trusted from download to execution.
Windows fires RegNotifyChangeKeyValue the instant
TSServerDrainMode is written. Zero delay.
EvtSubscribe on Security Event 4657 pushes the username, domain, and process
that made the change.
The service reads the registry, detects transitions, correlates attribution, evaluates the grace period, and appends to the audit store.
in-memoryCLI and PowerShell connect via named pipe. No file I/O, no registry reads. The answer is already computed.
\\.\pipe\drainctlOne DNS SRV record. Every agent finds the dashboard on its own. No scripts, no per-machine config, no manual URLs.
_drainctl._tcp.contoso.com
Auto TLS on first start. Self-signed cert, or bring your own. Certificate pinning. HSTS. Private key locked to SYSTEM.
Add and remove webhook + ntfy targets right in the dashboard. Per-target triggers and repeat intervals.
Add-, Get-, Remove-RDSHDrainNotificationTarget.
Full multi-target control from PowerShell.
Range-over-int, slices, clear(). Event-based config watcher.
Faster, leaner, modern.
Interactive wizard or silent deploy. INSTALL_MODE=dashboard,
WEBHOOK_URL=... — configure everything from the command line.
Setup wizard with install mode selection and RTF license.
drainctl dashboard enable, add one DNS SRV record, done. Agents discover and
register themselves.
Auto TLS, Kerberos SSO, certificate pinning, HSTS. No passwords, no login page.
State history chart, session gauges, event log, and multi-target notification editor — all in one page.
Set notification targets, grace periods, and session thresholds once in the dashboard. Every agent pulls them automatically — 50 servers, one config.
Setup wizard with license acceptance, install mode selection, and configuration options. The recommended way to install interactively.
Same MSI for RMM, SCCM, Intune, or GPO deployment. No UI — configure everything via properties.
msiexec /i LISSTech.DrainCtl.msi /qn
Just the cmdlets — no service, no CLI. Great for quick checks and scripting.
Install-Module LISSTech.DrainCtl