[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 652
  • Last Modified:

Powershell command Question

Is there a powershell command to list active sessions on a server?
I want to find out who is actively logged into it.
0
cjameson74
Asked:
cjameson74
1 Solution
 
QlemoC++ DeveloperCommented:
Approach utilizing WMI:
Get-WmiObject Win32_LoggedOnUser | %{$_.Antecedent.ToString().Split(',')[1]} | where-object {!($_ -match "System|Local|Network")}

Open in new window

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

qwinsta /server:serveripaddress

http://www.techtalkz.com/blog/tips-n-tricks/how-to-view-disconnect-remote-desktop-sessions-from-commandline.html
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now