enable-alwayson not work for named instance

Hi all,

I installed a SQL server 2016 default instance and a SQL Server 2017 named instance (instance name is SQL17) on my Windows 2012 Server.

I opened a powershell windows with administrator mode, import module SQLPS. Then I run invoke-sqlcmd to query from the default instance and named instance, it works. but when I run enable-sqlalwayson, it only worked for my default instance(I checked from SQL Server configuration mamanger), and get error with named instance. Why?

Please refer the screenshot for detail error message.

Any help will be appreciate!


Check out this documentation and tweak your command slightly.


The example shows this as the proper command for an instance

Enable-SqlAlwaysOn -Path SQLSERVER:\SQL\Computer\Instance


Not the answer you're looking for? Browse other questions tagged or ask your own question.