Sometimes we come across entire domains with standardized passwords for all users, in addition to being totally insecure, it involves other governance problems.
Make the user change the password at the next login, through the graphical interface, there are two ways:
1 – Configure passwords to expire in a certain period of time, and wait for this period to arrive.
2 – Change to new passwords prompting change at next login.
Read more:
Brute force attack: what is it, how does it work and how to avoid it?
How to fix the trust relationship between the workstation and the AD domain
How to find inactive computers and users in AD with Powershell
MFA, do you know what it is?
How to forward in Exchange Online to more than one Mailbox
Particularly, the first option is not very functional for this purpose, see that it is only for this purpose, that we need to change it quickly, this option must be enabled so that users periodically change their passwords.
In the second option, the impact is very large, we will have to change passwords and inform users.
The way I usually do it, and in particular I prefer, is to run a script that requests the change of the next login without changing the user's current password, in this case we can execute the following codes:
Force a user to change password at next login:
Set-MsolUserPassword -UserPrincipalName [email protected] -ForceChangePasswordOnly $true -ForceChangePassword $true
Force all domain users to change password at next login:
Get-MsolUser -All | Set-MsolUserPassword -ForceChangePasswordOnly $true -ForceChangePassword $true
Force a domain user group to change the password at the next login using the Country parameter:
Get-MsolUser -All | ? {$_.Country -eq "BR"} | Set-MsolUserPassword -ForceChangePasswordOnly $true -ForceChangePassword $true
In this command you can change the parameter “Country” to “Department”, for example, and only change the passwords for a certain sector.
Was this article helpful?
To maintain a quality standard for you, we have invested in a great hosting plan, Paid CDN, Website Optimization Plugins, etc ...
Help us to keep the project active!
Leave an answer