List and logoff remote RDS sessions

Some tooltips on remote sessions query and logoff:

QWINSTA

qwinsta /?

Command line tool to query current sessions

(alternative command line tool: query user or quser)

OR:

Download PStools from sysinternals and use the utility psloggedon.exe

 

——————-

LOGOFF

Several options… one is

take note of session ID in question by using qwinsta, then
rwinsta SessionID /server:”servsername” /V(erbose)

OR;

logoff /?

To logoff a remote session, take a note of ID and use it like:

logoff /server:myserver 15 /v

More articles

Optional features

Check available optional features: DISM /Online /Get-Capabilities Install an optional feature: DISM /Online /Add-capability /capabilityname:Media.MediaFeaturePack~~~~0.0.1.0

Read More »

AD retention period

Check AD retention tombstone value: Import-Module ActiveDirectory $ADForestconfigurationNamingContext = (Get-ADRootDSE).configurationNamingContext $DirectoryServicesConfigPartition = Get-ADObject -Identity “CN=Directory Service,CN=Windows NT,CN=Services,$ADForestconfigurationNamingContext” -Partition $ADForestconfigurationNamingContext -Properties *

Read More »