Override password complexity or history when reset password
-
2012년 3월 3일 토요일 오후 6:36
I create a simple powershell to import username to be reset from CSV file. The first run went just fine. Now that I am done with it, I need to change it back to original (default) password, P@$$w0rd. I kept getting error that it doesn't meet complexity, length, or history.
FYI: I use set-adaccountpassword
I checked on the GPO, the password complexity is set to disable or 0 on all of those.
Since script doesn't work, I had to manually reset it one by one with that password and it went just fine.
Any idea on how can I solve this? I still need to do it on 100+ users.
모든 응답
-
2012년 3월 3일 토요일 오후 8:05
Try using single quotes.
Set-ADAccountPassword 'CN=Jeremy Los,OU=Accounts,DC=Fabrikam,DC=com' -Reset -NewPassword (ConvertTo-SecureString -AsPlainText 'P@$$w0rd' -Force)
-
2012년 3월 3일 토요일 오후 8:07
Thank you for the fast response.
That is exactly what I did. It went through just fine the first time. But when I want to change it back, I can't.
-
2012년 3월 3일 토요일 오후 8:13
Thank you for the fast response.
That is exactly what I did. It went through just fine the first time. But when I want to change it back, I can't.
Show output - Get-ADDefaultDomainPasswordPolicy -
2012년 3월 3일 토요일 오후 8:15To debug further...Print dynamically generated string on console before you call "set-adaccountpassword" command. Make sure the generated string is as per expectation.
Thanks & Regards
Bhavik Solanki
Please click “Mark as Answer” if this post answers your question and click "Vote as Helpful if this Post helps you. -
2012년 3월 4일 일요일 오후 11:28
complexityenabled : false
Max/min password age 0
min pwd length 8
pwd history count 0this shouldn't hinder me from changing it back right?
-
2012년 3월 4일 일요일 오후 11:33
Is your Min Password Age literally 0 or is it "undefined"?
http://support.microsoft.com/kb/273004
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
-
2012년 3월 4일 일요일 오후 11:36it is 0
-
2012년 3월 4일 일요일 오후 11:39
again, i can change it manually, but not via script.
i have to reset them before the of today (sunday's afternoon)
any suggestion is welcome here
-
2012년 3월 4일 일요일 오후 11:41
Are you sure what you are using single quotes instead of double?
Because if you are using double quotes password will be less 8 chars.
- 답변으로 표시됨 MrKP 2012년 3월 4일 일요일 오후 11:43
-
2012년 3월 4일 일요일 오후 11:44
Man!!! yes... single quote did the trick.
while i have your support and idea here, what parameter do i need to ask user to change password on next logon.
-
2012년 3월 4일 일요일 오후 11:49
Add param -PassThru to Set-ADAccountPassword:
Set-ADAccountPassword ..... -PassThru | Set-ADUser -ChangePasswordAtLogon $true
- 답변으로 표시됨 MrKP 2012년 3월 4일 일요일 오후 11:50

