I get an error when I try to join the secondary replica to the Availability group thru Powershell while following the below Microsoft Documentation.
Join-SqlAvailabilityGroup -Path "SQLSERVER:\SQL\<SecondaryComputer>\Instance" -Name "<AG Name>"
Failed to join local availability replica to availability group ''. The operation encountered SQL Server error 41106 and has been rolled back. Check the SQL Server error log for more details. When the cause of the error has been resolved, retry the ALTER AVAILABILITY GROUP JOIN command.
I tried the T-SQL command thru SSMS as well.
USE MASTER ALTER AVAILABILITY GROUP <AG Name> JOIN;