Set a Password never to Expire

  1. Connect to Windows PowerShell using your company administrator credentials.
  2. Do one of the following:
    • To set the password of one user to never expire, run the following cmdlet by using the user principal name (UPN) or the user ID of the user:
      Set-MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $true
    • To set the passwords of all the users in an organization to never expire, run the following cmdlet:
      Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true