To do so, you can leverage this dedicated custom script, which uses PowerShell commands (in particular Start-Process) to retrieve the information about the current sessions so the currently logged-in users.
The script has been validated and tested on Windows Server 2019 with PowerShell version 5.1.19041.2364.
You can find it in our examples library. Use is as it is or customize it to fit your needs.
Use our script to be able to:
Use the pre-configured scripts to monitor and manage network-connected devices, cloud services, and web applications. By using standard network protocols, the scripts will allow you to retrieve valuable data and execute actions on the monitored devices and services.
Build or customize scripts according to your network monitoring needs.
Additionally, you can apply customized alerts on scripts to be notified when a specific event occurs.