Bison Infosolutions Knowledgebase
Protect your Lenovo Server
Contact WhatsApp

How to Identify Logged-In User Accounts in Remote Desktop (RDP) Sessions on Windows Server

Remote Desktop Protocol (RDP) is widely used by system administrators, IT engineers, support teams, and enterprises to remotely manage Windows servers and client systems. In multi-user environments such as Windows Server 2016, 2019, 2022, and Windows 11, administrators often need to determine which user account is currently logged into an RDP session.

One common challenge is that the RDP connection bar at the top of the screen only displays the server or host name, not the username of the connected session. This can create confusion when multiple administrators are connected simultaneously.

This article explains various methods to identify logged-in RDP users, display usernames inside sessions, and improve RDP session management in enterprise environments.


Understanding the RDP Top Connection Bar

When connecting to a remote machine using Microsoft Remote Desktop Connection (mstsc.exe), the top connection bar usually displays:

server-name.domain.com

or

IP Address

By default, Microsoft RDP does not show:

  • Logged-in username
  • Domain account
  • Session ID
  • User role

This behavior is normal and built into the Remote Desktop client.


Method 1: Use QUERY USER Command

The simplest and most reliable method to identify logged-in users is the query user command.

Command

query user

or

quser

Example Output

 USERNAME              SESSIONNAME        ID  STATE   IDLE TIME  LOGON TIME
administrator rdp-tcp#5 2 Active . 5/23/2026 8:15 AM
balvinder rdp-tcp#6 3 Active . 5/23/2026 9:10 AM

Information Provided

FieldDescription
USERNAMELogged-in user account
SESSIONNAMERDP session identifier
IDSession ID
STATEActive or Disconnected
IDLE TIMEUser inactivity
LOGON TIMESession login timestamp

Advantages

  • Built into Windows
  • No additional software required
  • Fast and lightweight
  • Works on Windows Server and Windows Client OS


Method 2: Use QWINSTA Command

The qwinsta command provides session-level details.

Command

qwinsta

Example Output

 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
services 0 Disc
console 1 Conn
rdp-tcp#5 administrator 2 Active
rdp-tcp#6 balvinder 3 Active

Purpose

qwinsta is useful for:

  • Checking active RDP sessions
  • Identifying disconnected users
  • Monitoring terminal servers
  • Troubleshooting RDS environments


Method 3: Display Logged-In Username on Desktop Using BGInfo

In enterprise environments, administrators commonly use BGInfo from Microsoft Sysinternals.

What is BGInfo?

BGInfo automatically displays system information directly on the desktop wallpaper.

It can show:

  • Username
  • Computer name
  • IP address
  • OS version
  • RAM
  • Domain
  • Session information

Benefits

  • Immediate identification of logged-in user
  • Helpful for shared servers
  • Useful in Terminal Services environments
  • Reduces administrative confusion

Download BGInfo

Microsoft BGInfo

Example Display Information

Computer Name : SERVER01
Logged User : administrator
IP Address : 192.168.1.10
OS : Windows Server 2019

Deployment Options

BGInfo can be deployed via:

  • Group Policy
  • Startup scripts
  • Scheduled tasks
  • Login scripts


Method 4: Use PowerShell to Check Logged-In Users

PowerShell provides advanced session management capabilities.

Basic Command

Get-WmiObject Win32_ComputerSystem | Select Username

Example Output

Username
--------
DOMAIN\Administrator

Alternative Using CIM

Get-CimInstance Win32_LoggedOnUser

Benefits

  • Automation friendly
  • Scriptable
  • Ideal for monitoring tools
  • Suitable for enterprise administration


Method 5: Use Task Manager

Task Manager also displays connected RDP users.

Steps

  1. Press:
Ctrl + Shift + Esc
  1. Open:
Users Tab
  1. View:
  • Logged-in usernames
  • Session status
  • CPU usage
  • Memory usage

Best For

  • Quick visual monitoring
  • Single-server administration
  • Helpdesk troubleshooting


Method 6: Use Remote Desktop Managers

Third-party RDP management tools provide better visibility than Microsoft MSTSC.

Popular Tools

Remote Desktop Manager

Remote Desktop Manager

mRemoteNG

mRemoteNG

Features

  • Username display
  • Tabbed sessions
  • Credential management
  • Color-coded environments
  • Multi-server administration
  • Session grouping


Method 7: Customize RDP File Names

Administrators often create customized .rdp shortcuts.

Example

Instead of:

server01.rdp

Use:

server01-admin.rdp
server01-support.rdp
server01-backup.rdp

This makes identification easier when multiple sessions are open.


Method 8: Display Username Using Login Script

You can automatically display username information using a startup or login script.

Batch File Example

@echo off
title %username%@%computername%

PowerShell Example

Write-Host "Logged in as: $env:USERNAME"


Best Enterprise Practice

For professional IT environments:

Recommended Combination

ToolPurpose
BGInfoVisual desktop identification
query userQuick CLI checks
PowerShellAutomation
RDP ManagerMulti-session management

This combination provides:

  • Better server management
  • Reduced session confusion
  • Improved troubleshooting
  • Faster administrator workflow


Security Considerations

When monitoring RDP sessions:

  • Use least privilege access
  • Monitor disconnected sessions
  • Log idle users off regularly
  • Audit RDP access
  • Use Network Level Authentication (NLA)
  • Enable session timeout policies


Conclusion

Although Microsoft Remote Desktop Connection does not display the logged-in username in the top connection bar, administrators have several reliable methods to identify active RDP users.

Commands like query user and qwinsta provide quick visibility into active sessions, while tools like BGInfo and Remote Desktop Manager significantly improve enterprise usability.

For IT engineers and Windows administrators managing multiple servers daily, implementing these methods can streamline server operations, reduce confusion, and improve administrative efficiency.


#WindowsServer #RDP #RemoteDesktop #WindowsAdmin #SysAdmin #ITSupport #PowerShell #CMD #BGInfo #Sysinternals #Windows2019 #Windows2016 #Windows2022 #RemoteAccess #TerminalServer #RDS #Microsoft #ServerManagement #WindowsCommands #ITEngineer #Networking #ActiveDirectory #WindowsTools #ServerAdmin #RemoteDesktopServices #Helpdesk #TechSupport #WindowsSecurity #ServerMonitoring #DesktopSupport #MSTSC #RemoteLogin #SessionManagement #SystemAdministrator #WindowsInfrastructure #ITAdministration #CommandLine #WindowsTips #WindowsTech #EnterpriseIT #TerminalServices #RDPManagement #UserSessions #ServerSupport #WindowsUtilities #PowerShellScripts #BatchScripts #RemoteDesktopManager #mRemoteNG #TechnicalArticle


remote desktop rdp session windows server query user command quser command qwinsta terminal services remote desktop services rds server windows administration system administrator windows server 2019 windows server 2016 windows server 2022 r
Sponsored