Generate a list of when users last changed their passwords in Office 365
From time to time you may need to confirm when a or all users last changed their Office 365 passwords. You can generate a list with this information through the following scenarios.
For a single user:
Get-MsolUser -UserPrincipalName email@example.com | select DisplayName, LastPasswordChangeTimeStamp
For all users:
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp
You can export this information to a CSV file for use within Microsoft Excel using this cmdlet:
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp | Export-CSV PasswordChange.csv -NoTypeInformation