I need to pass secondary replica name in a variable to a command
for example
I get the primary replica name using
Get-DbaAvailabilityGroup -SqlInstance ListenerName| Select-Object * -ExpandProperty PrimaryReplicaServerName
How do I get the secondary replica name?
Thanks