Use SQL Login for Synchronizing AG Logins

37 Views Asked by At

I have a script that I typically use to sync AG logins. However, I need to implement it to run automatically using SQL Credential and Password. Does anyone know how I can adjust the below script to use a SQL login and password?

Get-DbaAvailabilityGroup -SqlInstance 'My-AG' | Sync-DbaAvailabilityGroup -Exclude SpConfigure, CustomErrors, Credentials, DatabaseMail, LinkedServers `
    , LoginPermissions, SystemTriggers, DatabaseOwner, AgentCategory, AgentOperator, AgentAlert, AgentProxy, AgentSchedule 
0

There are 0 best solutions below