How to change Office 365 Login password for all user – For Administrators only: This article explains how to change office 365 login password for users or for all users. After the migration, you may have to set or change all user’s passwords so that they can login, and also change their password as necessary. However when assigning a new password, you may consider changing the password complexity requirement as per your organization’s requirement. Below is the step by step procedure to achieve all this. Installing and configuring Windows Azure PowerShell Module:
- 1. Login to Office 365 via Azure PowerShell. It’s advised to install the latest version of PowerShell. Prerequisite for Azure PowerShell is Microsoft Online Sign-in Assistant. You can download it from here.
- 2. You can download the Azure PowerShell from the links below:
- 3. Install the Sign-in Assistant, and Azure Active Directory Module, and launch Windows Azure PowerShell as Administrator (using Run as Administrator)
Run the following commands to connect with your Office 365 account:
- Set-ExecutionPolicy = unrestricted
- $cred = Get-Credential -Credential $user
Enter the credentials for your Office 365 Admin account and hit OK.
- Import-Module MSOnline
- Connect-MsolService -Credential $cred
- $msoExchangeURL = “https://ps.outlook.com/powershell/”
- $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $msoExchangeURL -Credential $cred -Authentication Basic -AllowRedirection
- Import-PSSession $session
Now you are connected to Office 365 via PowerShell. Changing Password Complexity requirement: You can change the password complexity requirements for Office 365. By Default, you are required to use 8-16 Character password which should include a combination of three: Upper Case, Lower Case, Number and Special Characters.
- Get-MsolUser | Set-MsolUser -StrongPasswordRequired $false
Change the Password Expiration Policy for Office 365: You can change when the password for the users shall expire. By default, its set to 90 days. However, you can change this by running the following command:
- Get-MsolUser | Set-MsolUser -PasswordNeverExpires $True
Change/Reset Password for Single User: This command will allow you to change a user’s password for his Office 365 account.
- Set-MsolUserPassword -UserPrincipalName <UserEmailAddress> -NewPassword <“New Password”> -ForceChangePassword $False
Note: Use of Quotes (“ ”) when specifying the password will allow you to use Space character as a part of the password. ForceChangePassword attribute can be $true or $false. You can specify $false manually if you do not wish to change the password at the next logon. Default value is true if not specified. Change All user’s password: This command will change all user’s password for their Office 365 account to a specific password.
- Get-MsolUser | Set-MsolUserPassword –NewPassword <”New Password”>
Note: It’s recommended that you do not set the ForceChangePassword to False when doing a bulk change. This will ensure that when the user logs in to Office 365, the user will be prompted to set his own password.
Latest posts by Rishi Chaudhary (see all)
- ShadowCopy Backup after renaming VSSADMIN.EXE - October 5, 2016
- No Network Connection after Windows 10 Upgrade – Fixed - August 25, 2015
- Windows 10 System Tray Notification Issue - August 7, 2015