Enable AlwaysOn with Powershell

By default Enable-SqlAlwaysOn try to restart the sql server service if -NoServiceRestart option is not used.With -NoServiceRestart will make changes in the registery but it will only take effect once the Services re recycled.

--Standalone sql instance

Enable-SqlAlwaysOn -Path SQLSERVER:hostname or instance name in case of named instance -NoServiceRestart

--Clustered Instance

Enable-SqlAlwaysOn -Path SQLSERVER:SQLInstance Name -NoServiceRestart

Leave a Reply

Your email address will not be published.