"Test-SqlAvailabilityGroup" takes too much time Can anyone explain me why the command Test-SqlAvailabilityGroup takes too much time ?
Is there a fastest way to check if a an availability group exists or not (preferably on PowerShell) ?
Thanks.
I guess if you only want to see if the Availability group exists, you could query the DMV:
select name from sys.availability_groups

That will return all the name of the AG(s) on that specific instance.
It could be done from PowerShell too with a &quot;invoke-sqlcmd&quot; pretty easilly.