如何使用 powershell 为所有用户更改“用户无法更改密码”

How to chnage '' User cannot change password'' with powershell for all users

我在 AD 中的所有用户都没有更改密码的权限,我想更改它。如何通过 powershell 更改它?

如果你真的想为每个用户做,只需几行就可以完成

$users = Get-ADUser -Filter *
foreach ($user in $users)
{
    Set-ADUser -Identity $user -CannotChangePassword $false
}