Question

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.

Était-ce utile?

La solution 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 ...

Autres conseils

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)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top