Display information about user sessions and process. More information: https://learn.microsoft.com/windows-server/administration/windows-commands/query.
query session
query session /server:{{hostname}}
query user
query session /server:{{hostname}}
query process
query process {{session_name|user_name}}