In this recipe, we will join the secondary replicas to an existing Availability Group.
Before we proceed with this recipe, the availability group needs to be created. Let's take a look at the Creating an AlwaysOn Availability Group recipe.
As documented on MSDN, the prerequisites to join the secondary replicas are as follows:
Since we need to execute the command on the secondary instances, ...