Edit the variables at the top with the correct names, ports and make sure SPN's are correct and in place I have had some issues using the main AG PowerShell setup script at the end snapping in the replicas due to missing SPN's. This is pretty simple to use and not much code considering what is accomplished as the end result. I hope you are able to make good use of the script. It is kinda fun to sit and watch PowerShell do the work. I added some write-host code so you know where the script is at while it is processing.
PowerShell vs GUI Availability Group Rebuild
Windows Cluster\SQL Availability Group rebuild times comparison - Management Studio & Cluster Manager Vs PowerShell Commands
2013-06-17
3,056 reads