PowerShell Lab
Build, find and save PowerShell
Reviewed templates and commands with requirements, permissions and risk spelled out. Nothing here runs anything — you copy, review and run it yourself.
Search pages, tools, PowerShell commands and ports
List sessions on a server and log off a disconnected one.
1# List sessions (ID, user, state)2quser /server:RDS013 4# Log off session 3 on RDS015logoff 3 /server:RDS01Logging off discards unsaved work in that session.
| /server | Remote Desktop Session Host | RDS01 |
| Session ID | ID from the quser output | 3 |