Problem with Script to Synchronize Login on AlwaysONConnection AlwaysOn AG Listener ProblemProblem with...

How can I be pwned if I'm not registered on the compromised site?

Practical reasons to have both a large police force and bounty hunting network?

Why would the IRS ask for birth certificates or even audit a small tax return?

Should I use HTTPS on a domain that will only be used for redirection?

Naming Characters after Friends/Family

Why doesn't "adolescent" take any articles in "listen to adolescent agonising"?

Has a sovereign Communist government ever run, and conceded loss, on a fair election?

Commonest[] function doesn't actually show commonest elements

Caulking a corner instead of taping with joint compound?

How does insurance birth control work in the United States?

Sundering Titan and basic normal lands and snow lands

A bug in Excel? Conditional formatting for marking duplicates also highlights unique value

How spaceships determine each other mass in space?

“I had a flat in the centre of town, but I didn’t like living there, so …”

What is the purpose of a disclaimer like "this is not legal advice"?

Rationale to prefer local variables over instance variables?

Why is there an extra space when I type "ls" on the Desktop?

PTIJ: Mordechai mourning

Faulty RAID1 disk now shows as foreign

How do you write a macro that takes arguments containing paragraphs?

Is divide-by-zero a security vulnerability?

Can inspiration allow the Rogue to make a Sneak Attack?

Effect of "wrong" driver with slightly long RS-485 stubs

Giving a talk in my old university, how prominently should I tell students my salary?



Problem with Script to Synchronize Login on AlwaysON


Connection AlwaysOn AG Listener ProblemProblem with pattern matching on unicode charactersManual Failover with AlwaysOn availability groupProblem with “not” in full text searchProblem with Restored DBMaintenance plan in AlwaysOn environmentAlwaysOn— SQL Jobs UnderstandingFCI with Alwayson Availability Group (Asymmetric Storage)Alwayson + FCI with independent StorageAlwaysOn AG with and without listener













0















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.



https://maq.guru/synchronizing-sql-server-logins-in-an-always-on-availability-group/



Only one problem, when an user SQL have Policy enabled tghi script can't change password on other node.



Error message:




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:UsersAdministratorDesktopAutoCloneLogins.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.










share|improve this question









New contributor




Marco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • change the script to create the account on the target machine with CHECK POLICY off, then in a separate command, turn the CHECK POLICY back on. feedback.azure.com/forums/908035-sql-server/suggestions/…

    – Jonathan Fite
    2 hours ago
















0















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.



https://maq.guru/synchronizing-sql-server-logins-in-an-always-on-availability-group/



Only one problem, when an user SQL have Policy enabled tghi script can't change password on other node.



Error message:




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:UsersAdministratorDesktopAutoCloneLogins.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.










share|improve this question









New contributor




Marco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • change the script to create the account on the target machine with CHECK POLICY off, then in a separate command, turn the CHECK POLICY back on. feedback.azure.com/forums/908035-sql-server/suggestions/…

    – Jonathan Fite
    2 hours ago














0












0








0








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.



https://maq.guru/synchronizing-sql-server-logins-in-an-always-on-availability-group/



Only one problem, when an user SQL have Policy enabled tghi script can't change password on other node.



Error message:




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:UsersAdministratorDesktopAutoCloneLogins.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.










share|improve this question









New contributor




Marco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












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.



https://maq.guru/synchronizing-sql-server-logins-in-an-always-on-availability-group/



Only one problem, when an user SQL have Policy enabled tghi script can't change password on other node.



Error message:




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:UsersAdministratorDesktopAutoCloneLogins.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.







sql-server-2014






share|improve this question









New contributor




Marco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Marco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 5 mins ago









Arulkumar

799417




799417






New contributor




Marco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 hours ago









MarcoMarco

1




1




New contributor




Marco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Marco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Marco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • change the script to create the account on the target machine with CHECK POLICY off, then in a separate command, turn the CHECK POLICY back on. feedback.azure.com/forums/908035-sql-server/suggestions/…

    – Jonathan Fite
    2 hours ago



















  • change the script to create the account on the target machine with CHECK POLICY off, then in a separate command, turn the CHECK POLICY back on. feedback.azure.com/forums/908035-sql-server/suggestions/…

    – Jonathan Fite
    2 hours ago

















change the script to create the account on the target machine with CHECK POLICY off, then in a separate command, turn the CHECK POLICY back on. feedback.azure.com/forums/908035-sql-server/suggestions/…

– Jonathan Fite
2 hours ago





change the script to create the account on the target machine with CHECK POLICY off, then in a separate command, turn the CHECK POLICY back on. feedback.azure.com/forums/908035-sql-server/suggestions/…

– Jonathan Fite
2 hours ago










1 Answer
1






active

oldest

votes


















1














I would suggest using dbatools - Sync-DbaAvailabilityGroup with -Exclude <-- exclude the settings that you dont need to sync.



Honestly, you should sync all e.g. sp_configure, logins, jobs, etc






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Marco is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231574%2fproblem-with-script-to-synchronize-login-on-alwayson%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    I would suggest using dbatools - Sync-DbaAvailabilityGroup with -Exclude <-- exclude the settings that you dont need to sync.



    Honestly, you should sync all e.g. sp_configure, logins, jobs, etc






    share|improve this answer




























      1














      I would suggest using dbatools - Sync-DbaAvailabilityGroup with -Exclude <-- exclude the settings that you dont need to sync.



      Honestly, you should sync all e.g. sp_configure, logins, jobs, etc






      share|improve this answer


























        1












        1








        1







        I would suggest using dbatools - Sync-DbaAvailabilityGroup with -Exclude <-- exclude the settings that you dont need to sync.



        Honestly, you should sync all e.g. sp_configure, logins, jobs, etc






        share|improve this answer













        I would suggest using dbatools - Sync-DbaAvailabilityGroup with -Exclude <-- exclude the settings that you dont need to sync.



        Honestly, you should sync all e.g. sp_configure, logins, jobs, etc







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        KinKin

        53.9k481191




        53.9k481191






















            Marco is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Marco is a new contributor. Be nice, and check out our Code of Conduct.













            Marco is a new contributor. Be nice, and check out our Code of Conduct.












            Marco is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231574%2fproblem-with-script-to-synchronize-login-on-alwayson%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

            Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

            How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...