PowerShell 5.1+ · Windows Server 2016+ · Zero Dependencies

Terminal Services,
Respectfully.

Enumerate, audit, and log off Windows sessions across Active Directory — with a rich dashboard, async parallel logoff, and ticket-ready reports.

★ Show-UserSession — FleetGrid dashboard

PS> Install-Module LISSTech.UserSessions
✽ · ✽ · ✽

Features

Everything an MSP needs for session management, nothing it doesn't.

⚙

WTS Win32 P/Invoke

Direct WTSEnumerateSessions calls — no quser.exe parsing fragility, no locale bugs, no truncated session IDs.

⚡

Parallel Scanning

RunspacePool fan-out scans hundreds of servers concurrently. Throttle-controlled, PS 5.1-compatible. No ForEach-Object -Parallel required.

☃

Zero Dependencies

Pure PowerShell + built-in .NET. No ActiveDirectory RSAT module. Runs out-of-box on any domain-joined Windows host.

★

ANSI Dashboard

256-color terminal UI with box-drawing panels, status glyphs, idle-time heat coloring, and Cylon-style async logoff progress bars.

✎

Ticket-Ready Reports

Self-contained neobrutal HTML, browser preview plus CF_HTML rendered-paste clipboard. Drop straight into HaloPSA, ConnectWise, Outlook, or any ticket system.

⚠

Disabled User Detection

Flags sessions for disabled AD accounts — the gap between disabling an account and ending its sessions. Offboarding visibility built in.

✽ · ✽ · ✽

PowerShell API

Three cmdlets. One domain. Complete control.

Find-UserSession Find

Emit session objects for pipeline composition. Filter by user, OU, computer, or LDAP query.

# Find idle disconnected sessions Find-UserSession -Username jmariano | Where-Object { $_.IdleTime.TotalDays -gt 7 }
Show-UserSession Show

Rich dashboard with optional async logoff and report generation. The daily driver.

# Scan, logoff, rendered HTML report on the clipboard — one command Show-UserSession -LogOff -Confirm:$false -Report
Stop-UserSession Stop

Pipeline-bound single-session logoff with full ShouldProcess support. Surgical precision.

# Pipe stale sessions to logoff Find-UserSession | Where-Object State -eq Disconnected | Stop-UserSession -Confirm:$false
✽ · ✽ · ✽

Architecture

From AD discovery to dashboard render — the data pipeline.

🎮
Module
.psm1 + .psd1
🔍
Scan
orchestrator
🏢
AD Lookup
DirectorySearcher
⚙
WTS API
Win32 P/Invoke
📦
Sessions
typed objects
🎨
Render
dashboard / report
✽ · ✽ · ✽

Reports

Ticket-ready artifacts, generated in one command.

Neobrutal HTML

HTML

Self-contained single-file document. Browser preview plus CF_HTML clipboard for rendered paste into HaloPSA, Outlook, Word.

  • Operator identity & timestamp
  • Scope description
  • Per-server session tables
  • Logoff result tally
  • Disabled user section
  • Offline & errored hosts
  • Print-to-PDF ready
✽ · ✽ · ✽

Safety First

Guardrails baked into every destructive path.

⭐

Own-Session Guard

Logoff commands skip your current session unconditionally. You cannot log yourself out.

🧪

ShouldProcess

Full -WhatIf and -Confirm support. Bulk logoffs use a single batch-level confirmation prompt.

🔒

Read-Only Default

Show-UserSession without -LogOff is pure display. No side effects, ever.

📜

Audit Trail

Reports include operator identity, timestamp, scope, and outcome counts. Attach to tickets for compliance.

🌐

No External Deps

Pure PowerShell + built-in .NET. No network calls, no telemetry, no supply chain risk.

⚠

Offboarding Visibility

Disabled AD accounts with live sessions are flagged in both dashboard and reports. Find the gaps.

✽ · ✽ · ✽

Built by LISS Technologies

We build tools for MSPs who refuse to settle for "good enough." UserSessions is one piece of the LISSTech toolkit — purpose-built PowerShell modules for the managed services trenches.

✽ · ✽ · ✽