Office 365 get users last password change

This requires admin access to Azure / Office 365

Import-Module MSOnline

$login = Get-Credential
Connect-MsolService -Credential $login

Get-MSOLUser -All | Select DisplayName, UserPrincipalName, LastPasswordChangeTimestamp, PasswordNeverExpires | Sort-Object LastPasswordChangeTimestamp

Note You must have the PowerShell Azure Active Directory (MSOL) Cmdlets installed for this script to work.  You can download them here:

https://msdn.microsoft.com/en-us/library/azure/jj151815.aspx?f=255&MSPPError=-2147217396

Leave a Reply

Your email address will not be published. Required fields are marked *