Share via


user logon count

Question

Thursday, March 12, 2015 9:37 PM

I am trying to get user logon count

I am able to run a command:

Get-QADUser username -properties logoncount | select logoncount

and get a complete count. What if i need to get a number for a week? or a month?

Thank you.

All replies (6)

Friday, March 13, 2015 2:50 PM ✅Answered | 1 vote

It give you the total number of logons since the beginning of the AD universe. To track in detail you need to capture eventlog records and decode them or purchase a utility that logs and reports logons.

¯\(ツ)_/¯


Tuesday, March 17, 2015 10:18 AM ✅Answered

Hi Ogeccut,

You can query the logon information from event log, then filter the username and logon time, this function get-historylogon is for your reference:

PowerShell Script to fetch Logon/Logoff user on particular server {Get-WinEvent} {Get-EventLog}

If there is anything else regarding this issue, please feel free to post back.

If you have any feedback on our support, please click here.

Best Regards,

Anna Wang

TechNet Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]


Friday, March 13, 2015 12:20 AM

You will have to talk the boys and girls over at dell to find out how they do that.  It only works if you have the server version. It is a dell product so ask the vendor.

¯\(ツ)_/¯


Friday, March 13, 2015 1:01 PM

What if i use

Get-ADUser username -properties logoncount | select logoncount

Can i limit this to any time frame? Number of days?


Friday, March 13, 2015 2:08 PM

What if i use

Get-ADUser username -properties logoncount | select logoncount

Can i limit this to any time frame? Number of days?

nope.  It is just one number.

Search for third party apps that track logons.  There are quite a few.

¯\(ツ)_/¯


Friday, March 13, 2015 2:39 PM

So AD does not have the ability to track by number of day? is that the limitation? But can give me a complete number?

Just trying to understand,

Thank you.