Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

How to check the current logged on named users on a Microsoft terminal?

Solved706 views7th July 2023
4
Shihui Su [DevOps Advocate]205 8th February 2023 0 Comments

Hi,

I am currently using the Microsoft Platform connector to monitor a few terminals and would like to know whether it is possible to return the named users currently logged on to the terminals.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 7th July 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
2
Jochen Dewachter [SLC] [DevOps Advocate]2.16K Posted 8th February 2023 3 Comments

I believe this is currently not implemented in the Microsoft Platform connector. However this info should be available to retrieve via WMI. There's a class "win32_ComputerSystem" that returns a parameter "Username" that shows what user is logged on at the moment.
https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-computersystem

This is something that could be implemented in the connector.

Laurens Moutton [SLC] [DevOps Enabler] Posted new comment 9th February 2023
Laurens Moutton [SLC] [DevOps Enabler] commented 8th February 2023

I tested this with Windows Server 2019 Standard and there the UserName stays empty. Under Windows 11 it is being filled in. Seems like that property is not filled in in all cases.

Miguel Obregon [SLC] [DevOps Catalyst] commented 8th February 2023

Hi,

Maybe another option is to use the command:
query user

Checking the documentation available at Microsoft, this command is valid for Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/query-user

It is true that it is not a WMI query, but it could be an option in case we don’t find a WMI query that works for all Windows OS.

Laurens Moutton [SLC] [DevOps Enabler] commented 9th February 2023

I further investigate this: this UserName property returned with the Win32_ComputerSystem returns the name of the user that is physically sitting at the computer. If nobody is sitting at the computer, but logs in through remote desktop then the UserName property will be empty. When I checked the Win11 I was physically sitting at it, when I checked the Win2019 I was connected via remote desktop which explains what I was seeing. Remote desktop to Win11 also gives an empty Username.
To summarize:
-If you only want to know who is logged in that is physically sitting at the computer (looking at that screen, using the keyboard and mouse attached to that computer) then Win32_ComputerSystem, UserName can be used.
-If you want to know everyone that is logged in to that computer (both physically and remote desktop sessions) then this can be derived from the queries that I’ve written in my answer

You are viewing 1 out of 2 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin