How to get information about an AG group using powershell

  • Hi Experts,

    Does anyone has a powershell script which displays below information:

    for a given AG listener name or AG group name, I need to get Listnener name, AG name, replicas , replica role desc ,

    Can we get this information using pure powershell which reads registry values or do we need to execute a sql DMV to get that information ?

    Thanks,

    Sam

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • dbatools https://dbatools.io/has a whole group of PowerShell tools to get information about AG.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply