Jess Pomfret continues a series on replication in dbatools:
This post is focusing on how to setup replication with dbatools. We support all three flavours – snapshot, transactional and even merge replication!
In this article I’ll be creating a transactional publication, but the steps for setup are very similar no matter which flavour you’re implementing.
I’ll walk through and demonstrate all the steps to setup replication in this article as dbatools allows us to complete them all. However, I won’t go into a lot of details on why or how replication works, or provide guidance on best practices. If you need more information on replication as a technology then I recommend visiting the Microsoft Docs.
Read on for a demonstration of how the cmdlets work for adding a publication, articles, subscriptions, and more.