We help IT Professionals succeed at work.
Get Started

How to use PowerShell to parse the security log on 2008 to output User names.

Last Modified: 2012-05-05
I've got several web servers that at times I need to know dates and times that a specific user, or handful of users were connected.  I easily do this by running the following PowerShell command on the specific web servers:

get-eventlog security -newest 1000 | select-object TimeGenerated,EntryType,EventID,UserName | where-object {$_.UserName -eq "Domain\UserName"} | group-object TimeGenerated,Username

The problem is, this only works on Windows 2003, and for the life of me, I can't figure out what properties I need to pull to get the same information on my 2008 servers.

Any assistance you can provide would be greatly appreciated.

Watch Question
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE