Link to home
Create AccountLog in
Avatar of bibi92
bibi92Flag for France

asked on

format the result of below command in table

Hello,


How can I format the result of below command in table : 

 Get-DbaAvailabilityGroup -SqlInstance $sReplica  |   ForEach-Object { write-host $_.AvailabilityGroup; Set-DbaAgReplica -SqlInstance $pReplica -Replica $sReplica -AvailabilityGroup $_.AvailabilityGroup -AvailabilityMode "AsynchronousCommit" -FailoverMode "Manual" } 


Thank you 

ASKER CERTIFIED SOLUTION
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer

All you can see now is a list of availability groups for the source MSSQL instance, and maybe self-created error messages if something went wrong in setting the same in the other instance. Formatting that into a table doesn't make sense.