We can set an Office 365 user password by using the Azure Active Directory powershell cmdlet Set-MsolUserPassword. To use this cmdlet we need to install Microsoft Online Services Sign-In Assistant and Azure Active Directory Powershell Module.
Note: Before proceed, Install and Configure Azure AD PowerShell
Set-MsolUserPassword –UserPrincipalName [UserPrincipalName] –NewPassword [New Password] -ForceChangePassword $False
The below command set the password for the user “[email protected]”
Set-MsolUserPassword –UserPrincipalName '[email protected]' –NewPassword 'MyPa$w0rd' -ForceChangePassword $False
Advertisement