I need a quick list of the most recent login time for users starting with Avaya-*

I have a windows 2012 AD Domain. The Telecom department came to me with a list of user accounts connected to our phone system They want a list of the last time each account has logged in. In checking ADUC, it appears if I display a user name and go to the OBJECT tab, the MODIFIED tab reveals the last time an account connected. I am trying to do an advance search and search for all accounts starting with AVAYA- and the MODIFIED date of each account. Assuming this does indicate the last time an account connected, which it appears to . I do not care if I use ADUC or a Powershell script. An out put file would be nice too if possible. OR if someone has a better way to get a list of the last time all accounts starting with Avaya- logged in, that would be fine too. ALl ideas welcome
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mal OsborneAlpha GeekCommented:
Probably not helpful to you right now, but I routinely rollout a GPO and logon/logoff scripts that create simple text files on a server share for auditing these events. Bit of effort to set up, but usually turns out to be well worth the effort. Can even create a link on managers desktops, so they can better snoop on staff.

Scripts I have in use at the moment are below:

echo Logon,%DATE%,%TIME%,%COMPUTERNAME% >> \\dc01\onofflogs$\%USERNAME%.txt
echo Logoff,%DATE%,%TIME%,%COMPUTERNAME% >> \\dc01\onofflogs$\%USERNAME%.txt

This creates a new text file for each user, with one line for each logon and logoff event, with the date, time and machine name included. Really useful!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shaun VermaakTechnical SpecialistCommented:
Above will work for interactive logons only. I suggest you enable auditing and pull this info from the logs.

If you use the above, only give write access. This information is a goldmine for hackers
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.