To reset passwords, we need to use the following cmdlet:
Set-MsolUserPassword
This cmdlet resets the password for a user. It can be used for users with standard identities. The cmdlet accepts six parameters, as shown in the following list. Out of these six parameters, either UserPrincipalName
or ObjectId
is required:
[-ForceChangePassword <Boolean>]
: Indicates whether the user must change their password the next time they sign in.[-ObjectId <Guid>]
: Specifies the unique ID of the user for whom to set the password.[-UserPrincipalName <String>]
: Specifies the UserPrincipalName of the user for whom to set the password.[-TenantId <Guid>]
: Specifies the unique ID of the tenant on which to perform the operation. The default value is the tenant of the current user. This parameter applies only to partner users.[-ForceChangePasswordOnly <Boolean>]
: This will force the user to change the password.[-NewPassword <String>]
: Specifies a new...