Office 365–Change the password expiration policy
The default password expiration policy of Office 365 is set to 90 days. That means that users have to change their password every 90 days. I think basically this is a good and secure policy but on the other side, it can be annoying and maybe your company has an other security policy or for some other reason you have to deactivate/change this.
We can change this setting through PowerShell with the Microsoft Online PowerShell Module.
We can change this setting through PowerShell with the Microsoft Online PowerShell Module.
- First connect to Office 365 via PowerShell more on this here. Consider, you need administration privileges to change account settings for other users..
- To get a list of the Microsoft Online Office 365 users:Get-MsolUser
- To get the details for a user:Get-MsolUser -UserPrincipalName user.name@domain.xy
- Now you can use the following cmdlet to change the password policy for the password to never expire..Set-MsolUser –UserPrincipalName user@contoso.com –PasswordNeverExpires $true
- and if you’re a freak like meGet-MsolUser | Set-MsolUser -PasswordNeverExpires $trueThat will change the password policy for all users – have phun!
Yorumlar