I'm trying to resolve an issue. I've a two nodes with Always On enabled, I want to synchronize user over the nodes. I see that fantastic script.
Only one problem, when an user SQL have Policy enabled tghi script can't change password on other node.
Invoke-Sqlcmd : A HASHED password cannot be set for a login that has CHECK_POLICY turned on.
A HASHED password cannot be set for a login that has CHECK_POLICY turned on.
At C:\Users\Administrator\Desktop\AutoCloneLogins.Or.ps1:343 char:17
+ ... Invoke-Sqlcmd -Query $Query -ServerInstance $SecondaryRep ...
+ CategoryInfo : InvalidOperation: (:) [Invoke-Sqlcmd], SqlPowerShellSqlExecutionException
+ FullyQualifiedErrorId : SqlError,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand**
Please help me to resolve this issue.