解决方法:
工具、脚本、PowerShell
dsquery user ou=it,dc=itprocn,dc=com | dsmod user -pwd 123456 -mustchpwd yes
powershell:
Get-ADUser -Filter * -SearchBase "OU=it,DC=itprocn,DC=com" | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "123.com" -Force)
Get-ADUser -Filter * -SearchBase "OU=it,DC=itprocn,DC=com" | Set-ADUser -ChangePasswordAtLogon $true
-canchpwd {yes | no}
指定用户是否可以更改其密码(yes 可以更改,no 根本不能更改)。默认情况下,(yes)。
-pwdneverexpires {yes | no}
指定用户密码是否永不过期(yes 表示是,no 表示不是)。默认情况下,用户密码会过期 (no)。
-mustchpwd {yes | no}
指定用户是否必须在下次登录时更改其密码(yes 必须更改,no 不必更改)。默认情况下,用户不必更改密码 (no)。
-disabled {yes | no}
指定是否禁用用户帐户登录(yes 禁用登录,no 允许登录)。默认情况下,启用用户帐户登录 (no)。
-reversiblepwd {yes | no}
指定是否应使用可逆加密来存储用户密码(yes 表示应该,no 表示不应该)。默认情况下,用户不能使用可逆加密 (no)。
-acctexpires NumberOfDays
指定从今天算起用户帐户将到期的天数。0 值表示将今天的结束时间设置为到期时间。正值表示将将来的时间设置为到期时间。负值表示将以前的时间设置为到期时间。值 never 将帐户设置为永不过期。例如,0 值表示该帐户在今天结束时过期。值 -5 表示该帐户 5 天前就已经到期,并将以前的时间设置为到期日期。值 5 表示该帐户将在 5 天后到期。
联系客服