Link to home
Start Free TrialLog in
Avatar of Richard_Steiner
Richard_SteinerFlag for Nigeria

asked on

PowerShell command to check users who logged on to exchange

Hi guys,

I am trying to run a power shell command to list users who have logged on to exchange for a particular period eg 3 months ago

Anyone know a command or list of commands to show such details? Like login time, date, duration etc


Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

What is the version of Exchaange here ?

- Rancy
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Richard_Steiner


Hi Rancy,

its for exchange 2010 ..

this should do it for you

Get-MailboxStatistics -server servername | where {$_.Lastlogontime -lt (get-date).AddDays(-90)} | Select displayName,LastLoggedOnUserAccount,LastLogonTime

Open in new window

Thanks Richard,

Wont bug you with more articles or data ... as much is given and you can check if still not than can check further.

- Rancy
Also I found on Exchange 2007 you need to have the Outlook client on each machine have this registry entry for this to work correctly if you have Windows XP,
Even seen where you had to do it for Windows 7 and VISTA especially if they are remote clients.


IF CancelRPC key does not exist
Click to select Outlook subkey
On the edit menu point to NEW and then click Key
Type CancelRPC hit enter
Now select CancelRPC subkey

On Edit menu point to New click on DWORD value
Type EnablePerfTracking press enter
On edit menu click modify
Type 28 click OK

Hope this helps