Quantcast
Channel: Active questions tagged powershell-3.0 - Stack Overflow
Viewing all articles
Browse latest Browse all 123

Powershell script to see currently logged in users (domain and machine) + status (active, idle, away)

$
0
0

I am searching for a simple command to see logged on users on server.I know this one :

Get-WmiObject -Class win32_computersystem

but this will not provide me the info I need.It returns :domainManufactureerModelName (Machine name)PrimaryOwnerNameTotalPhysicalMemory

I run Powershell 3.0 on a Windows 2012 server.

Also

Get-WmiObject Win32_LoggedOnUser -ComputerName $Computer | Select Antecedent -Unique

gives me not the exact answers I need.I would love to see as well the idle time, or if they are active or away.


Viewing all articles
Browse latest Browse all 123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>