Invoke-sqmSqlAlwaysOnAutoSeeding
Always OnsqmSQLTool v1.8.2+ · Configuration⚠ Requires SQL 2016+ ✓ Prerequisites
Parameters
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| -SqlInstance | string | Optional | , | Primary replica instance. |
| -SqlCredential | PSCredential | Optional | , | Credentials for primary and replicas. |
| -AvailabilityGroup | string | Optional | , | Name of the availability group. |
| -EnableException | switch | Switch | $false | Re-throw exceptions immediately. |
| -WhatIf / -Confirm | switch | Optional | , | ShouldProcess (ConfirmImpact: High) guards configuration changes. |
| -All | switch | Switch | $false | When set, all Availability Groups on the instance are processed. |
Execution Flow
Examples
Validate AutoSeeding prerequisites (no changes)
Invoke-sqmSqlAlwaysOnAutoSeeding -SqlInstance "SQL01" -AvailabilityGroup "AG_Prod" -ValidateOnly
Enable AutoSeeding on AG with -WhatIf
Invoke-sqmSqlAlwaysOnAutoSeeding -SqlInstance "SQL01" -AvailabilityGroup "AG_Prod" -WhatIf