Aug 24 2022 01:36 AM
I'm trying to enable AlwaysOn using the following PowerShell script:
Enable-SqlAlwaysOn -ServerInstance $env:computername\$SQLServerInstance -NoServiceRestart
This works on SQL2019, but gives the following error on 2022:
Enable-SqlAlwaysOn : Could not obtain information about SQL Server Service 'MSSQL$SQL2022'.
At line:9 char:33
+ ... Enable-SqlAlwaysOn -ServerInstance $env:computername\$SQL ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (MSSQL$SQL2022:String) [Enable-SqlAlwaysOn], SqlPowerShellServiceException
+ FullyQualifiedErrorId : ServiceError,Microsoft.SqlServer.Management.PowerShell.Hadr.EnableSqlHADRServiceCommand
Is there a new version of the SQLServer module I need to get hold of?
Aug 24 2022 02:42 AM
Mar 19 2024 03:02 PM
@FGNicky Prerelease is not working