query user | Microsoft Learn
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/query-user
WEBApplies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012. Displays information about user sessions on a Remote Desktop Session Host server. You can use this command to find out if a specific user is logged on to a specific Remote Desktop Session Host server.
DA: 82 PA: 90 MOZ Rank: 30