Posts

Showing posts from July, 2016

Find logged on Users

Today I got asked to figure out what servers our team members are logged into. What better way than to right up a PowerShell script that runs every morning and shoots us an email. This process also helps out with the question "WHAT SERVER IS LOCKING OUT MY ACCOUNT!". I do have another PowerShell script that checks the PDC Emulators security logs for that, but that will be in a future post.






The script is a little long to explain so I'm just going to post it. I cant remember where I got the html section from. It's freak'n ugly (I'm not an html programmer), but works. Just go through and change the usernames you want to check for and the smtp settings at the bottom of the script. Also, you will need to have psloggedon.exe from....




https://technet.microsoft.com/en-us/sysinternals/psloggedon.aspx


Just make sure the exe is in your system32 dir.









CLS<# .NOTES -------------------------------------------------------------------------------- Code generated…