List of VPN enabled Users

Hi

I have been asked to provide a list of user who not only VPN but when was the last login and so forth

I am running Windows 2008 R2 and using Routing and Remote Access service.

Any help will be greatly appreciated
M SOSAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Will SzymkowskiSenior Solution ArchitectCommented:
Typically when you have a VPN you use a Security Group (VPN Users) to assign VPN access. Is this the case? If so you just need to get the list of users out of this group and then check their last logon date.

Get VPN Users
Import-module activedirectory
Get-ADGroupMember -Identity "VPN Users" | select samaccountname | export-csv "c:\vpnusers.csv" -nti

Open in new window


Check Last Logon Data for each user
$Users = import-csv "c:\vpnusers.csv"
ForEach ($user in $users) {
Get-ADUser -Identity $user -properties Name, LastLogonDate | select Name, LastLogonDate
}

Open in new window


Will.

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
M SOSAuthor Commented:
Thanks for that

I know I could get the names out of the group but what I want is when was the last time the users logged in using VPN.

The VPN group is called Mobile Users

Thanks
Will SzymkowskiSenior Solution ArchitectCommented:
For this specifically you will need to dig through the logs for RRAS. See the link below for details.
http://blogs.msdn.com/b/jananiv/archive/2006/02/16/533164.aspx

Will.
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
Active Directory

From novice to tech pro — start learning today.