Forum Discussion
GV IT
Sep 18, 2017Brass Contributor
set password expiry in O365
can i set password expiry for certain select group of users to get them to change their password regularly ?
currently, the system policy is set to 180 days expiry date.
but we noticed that some users did not changed their O365 account password.
If you set password expiry in O365, it will apply to all users. What you need to do to exempt is to set individual users password to never expire. You can do this via Powershell: https://support.office.com/en-us/article/Set-an-individual-user-s-password-to-never-expire-f493e3af-e1d8-4668-9211-230c245a0466
Also, you can set all users first to never expire,
Get-MSOLUser | Set-MSOLUser -PasswordNeverExpires $true
then change individually selected users to password that expires.
Set-MSOLUser -UserPrincipalName <alias> -PasswordNeverExpires $false
- Aljohn BonifacioSteel Contributor
If you set password expiry in O365, it will apply to all users. What you need to do to exempt is to set individual users password to never expire. You can do this via Powershell: https://support.office.com/en-us/article/Set-an-individual-user-s-password-to-never-expire-f493e3af-e1d8-4668-9211-230c245a0466
Also, you can set all users first to never expire,
Get-MSOLUser | Set-MSOLUser -PasswordNeverExpires $true
then change individually selected users to password that expires.
Set-MSOLUser -UserPrincipalName <alias> -PasswordNeverExpires $false
- DeletedIs possible to set password expired and not PasswordNeverExpires for single user?
You can set the password to never expire for a single user using the following PowerShell command:
Set-MsolUser -UserPrincipalName <your user> -PasswordNeverExpires $true
To force a single user to change the password during the next login, use the following command:
Set-MsolUserPassword -UserPrincipalName <your user> -ForceChangePassword $true
Please note that these commands only affects the users whose passwords are in the cloud. I.e. you are not using password hash sync, federated identity, passthru authentication, etc.
- Agree...PS is the answer here!