Chaning the password regularly is a good thing to do. However, this can be quite messy at times, especially when you have a number of devices that depend on this password. It is often easier to set a long and complex password, and to set it once. In this case, you may wish to disable the password expiration policy which is set by default to 90 days.
To do this, you will need the Microsoft Online Services Module for Windows PowerShell. There is a 32bit and 64bit version. You can download them here – http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh124998.aspx#BKMK_install
Once it has been installed, run the PS Command Shell and type the following commands (copy and paste).
- PS> $cred = get-credential
- Type in the Office365 Admin user. This is usually in the form of admin@[companyname].onmicrosoft.com
- PS> Connect-MsolService –Credential $cred
- PS> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Cred -Authentication Basic -AllowRedirection
- PS> Import-PSSession $Session
- PS> $users = Get-MsolUser
- PS> foreach ($user in $users) { Set-MsolUser –UserPrincipalName $user.UserPrincipalName –PasswordNeverExpires $true }
That’s it. This will disable the password expiration policy for all users for this organisation.
To check this, type PS> get-msoluser | select displayname, passwordexpirationdate
One thought on “Disable Password Expiration Policy in Office365”