all of my user in AD have no permition to change their password and I want to change it. How can I change it via powershell?
CodePudding user response:
If you truly want to do for every user, it can be done with just a couple lines
$users = Get-ADUser -Filter *
foreach ($user in $users)
{
Set-ADUser -Identity $user -CannotChangePassword $false
}