Powershell command Question

Posted on 2011-05-01
Last Modified: 2012-05-11
Is there a powershell command to list active sessions on a server?
I want to find out who is actively logged into it.
Question by:cjameson74
    LVL 67

    Accepted Solution

    Approach utilizing WMI:
    Get-WmiObject Win32_LoggedOnUser | %{$_.Antecedent.ToString().Split(',')[1]} | where-object {!($_ -match "System|Local|Network")}

    Open in new window

    LVL 7

    Expert Comment

    Not a powershell command but you can use the qwinsta command from the command line.

    qwinsta /server:serveripaddress

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
    New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
    This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
    This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now