Back to blog

List all users and date of last password change in Office 365

Nov 26, 2014 by Emma Robinson

If you need an easy way to find out when your users last changed their passwords in Office 365 you can do so in PowerShell.

We use a similar process to gather this information for our Last Password Change report in our market-leading Office 365 reporting tool 

First, connect to Windows Azure Active Directory using PowerShell and then run this cmdlet :

PS C:\> Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp
DisplayName LastPasswordChangeTimestamp
----------- ---------------------------
Janet Schorr 10/10/2014 01:26:03
Conf Room Rainier
Zrinka Makovac 10/10/2014 01:33:24
Conf Room Crystal
Sara Davis 10/10/2014 01:33:00
Tony Krijnen 10/10/2014 01:33:12
Katie Jordan 10/10/2014 01:27:17
Brian Johnson (TAILSPIN)
Garret Vargas 10/10/2014 01:25:39
MOD Administrator 10/10/2014 01:18:30
Fabrice Canel 10/10/2014 01:25:20
Service Account for Cogmotive Reports 05/11/2014 22:36:05
Conf Room Hood
Pavel Bansky 10/10/2014 01:27:42
Denis Dehenne 10/10/2014 01:24:09
Molly Dempsey 10/10/2014 01:27:30
Bonnie Kearney 10/10/2014 01:22:31
Junmin Hao 10/10/2014 01:26:50
Kari Furse 10/10/2014 01:27:05
Conf Room Stevens
Robin Counts 10/10/2014 01:32:39
Alex Darrow 10/10/2014 01:21:09
Conf Room Adams
Belinda Newman 10/10/2014 01:22:09
Aziz Hassouneh 10/10/2014 01:21:56
Dorena Paschke 10/10/2014 01:24:43
Rob Young 10/10/2014 01:31:46
Garth Fort 10/10/2014 01:25:51
Anne Wallace 10/10/2014 01:21:37
Conf Room Baker
Julian Isla 10/10/2014 01:26:37
David Longmuir 10/10/2014 01:23:40
Allie Bellew 10/10/2014 01:21:24

If you want to use this information in Excel you can export it to a CSV file using this cmdlet:

Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp | Export-CSV LastPasswordChange.csv -NoTypeInformation

 

Office 365 users with date of last password change

Office 365 users with date of last password change