Hi there
I am developing some PS scripts to set up an AlwaysOn availability group. I am trying to use the Enable-SqlAlwaysOn cmdlet to enable AlwaysOn on a remote server - I get a prompt saying 'You have to restart the SQL service in order for the change to take effect. Do you want to continue?' I click Yes but then get the following failure:
Enable-SqlAlwaysOn : ChangeHADRService failed for Service 'MSSQL$MyInstance_TEST'.
At line:1 char:1
+ Enable-SqlAlwaysOn -Path SQLSERVER:\SQL\MyServer\MyInstance_TEST
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Enable-SqlAlwaysOn], FailedOperationException
+ FullyQualifiedErrorId : Microsoft.SqlServer.Management.Smo.FailedOperationException,Microsoft.SqlServer.Management.PowerShell.Hadr.EnableSqlHADRServiceCommand
Anyone experienced this or has any thoughts?
Thanks 🙂