Invoke-sqmAlwaysOnSetup
AlwaysOn sqmSQLTool v1.8.2+
End-to-end CLI AlwaysOn setup: reads the WSFC, creates the Availability Group and synchronises logins.

Examples

Invoke-sqmAlwaysOnSetup -AvailabilityGroupName ProdAG -Database AppDb
Invoke-sqmAlwaysOnSetup -AvailabilityGroupName ProdAG -Database AppDb

    Reads the local cluster, creates ProdAG across all nodes using the discovered listener and
    service account, then syncs logins and enables automatic seeding.
Invoke-sqmAlwaysOnSetup -AvailabilityGroupName ProdAG -Database AppDb `
Invoke-sqmAlwaysOnSetup -AvailabilityGroupName ProdAG -Database AppDb `
        -SqlCredential (Get-Credential sa) -WhatIf

    Dry-run using SQL authentication; shows the planned actions without changing anything.