locked
LoggedOnUser Script through RDP RRS feed

  • Question

  • Hi there,

    Im pretty new with powershell scripting and was hoping to get some insights from more knowledgeable people here.

    My issue is creating a script that would access a quser or LoggedOnUsers of an IP address without connecting. Is that possible?

    Wednesday, June 13, 2018 3:27 PM

All replies

  • ????

    Without connecting to what?


    \_(ツ)_/

    Wednesday, June 13, 2018 5:19 PM
  • so I need to see if there is anyone logged on to the server before connecting. Everyone uses 1 general user in this server and just need to see whether (for example) root user is active or not.

    Also, im getting Error [1722]: The RPC server is unavailable. I already enabled these things:

    Services.msc

    Remote Procedure Call, Remote Procedure Call locator, Remote Registry, RPC endpoint mapper, Windows management instrumentation, Windows remote management

    Firewall Settings

    WMI

    Tuesday, June 26, 2018 6:42 PM
  • If it also helps, I have an admin user that I can access to get these information. 
    Tuesday, June 26, 2018 6:46 PM
  • There is  no command that can do what you ask.


    \_(ツ)_/


    • Edited by jrv Tuesday, June 26, 2018 10:34 PM
    • Proposed as answer by jrv Tuesday, June 26, 2018 10:34 PM
    Tuesday, June 26, 2018 8:03 PM
  • Im looking specifically for powershell, since its just a part of a bigger script im writing.
    Tuesday, June 26, 2018 10:24 PM
  • You can use "quser" to list RDP session statuses.

    quser /?

    Look in the Gallery for scripts that convert this to objects.


    \_(ツ)_/


    • Edited by jrv Tuesday, June 26, 2018 10:35 PM
    Tuesday, June 26, 2018 10:35 PM
  • PsLoggedOn and WMI will not work with RDP sessions. "quser" works across all logins.


    \_(ツ)_/

    Wednesday, June 27, 2018 12:51 PM
  • PsLoggedOn and WMI will not work with RDP sessions. "quser" works across all logins.


    \_(ツ)_/

    Except for the wmi class win32_computersystem, all the methods on that link work for me.

    Wednesday, June 27, 2018 1:41 PM