質問

I've got problems with setting new passwords via Powershell on Server 2012 R2:

Set-ADAccountPassword -Identity testuser48 
-OldPassword (ConvertTo-SecureString -AsPlainText "HelloPassword123#" -Force)
-NewPassword (ConvertTo-SecureString -AsPlainText "April456#@123" -Force)

I tried many different passwords but there's always an ADPasswordComplexityException.

FullyQualifiedErrorId : ActiveDirectoryServer:1325,Microsoft.ActiveDirectory.Management.Commands.SetADAccountPasword

Are there any other things I could try? All password complexity rules (incl. length, ...) are disabled.

役に立ちましたか?

解決 2

I just found out that I have to set both minimum and maximum password age from undefined to 0 in order for this command to work. That does not seem to be documented ...

他のヒント

Can you use -Reset instead of -OldPassword? Try below to see if it works for you. Also is this in a domain or a standalone server?

Set-ADAccountPassword -Identity testuser48 -Reset
-NewPassword (ConvertTo-SecureString -AsPlainText "April456#@123" -Force)
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top