Quantcast
Channel: Windows PowerShell – IT Answers
Viewing all articles
Browse latest Browse all 23

How to write a PowerShell 2 script to see what users are logged on?

$
0
0

I’m learning PowerShell. I have a test pc set up with Active Directory, called Enterprise1 (for Windows 2003 Enterprise edition sp2).
How would I write a PowerShell 2 script to see what users are logged on? Also how would I write a script to send all logged on users a message then log all users off, like in an emergency situation?


Viewing all articles
Browse latest Browse all 23

Trending Articles



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