Find out whether a password is set to never expire

  1. Connect to Windows PowerShell using your company administrator credentials.
  2. Do one of the following:
    • To see whether a single user’s password is set to never expire, run the following cmdlet by using the user principal name (UPN) (for example, or the user ID of the user you want to check:
      Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires
    • To see the “Password never expires” setting for all users, run the following cmdlet:
      Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires