Author | Colin Douglas |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Get-DbaRepPublication on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaRepPublication.
Displays all publications for a server or database.
Quickly find all transactional, merge, and snapshot publications on a specific server or database.
All replication commands need SQL Server Management Studio installed and are therefore currently not supported. Have a look at this issue to get more information: https://github.com/dataplat/dbatools/issues/7428
Get-DbaRepPublication
[-SqlInstance] <DbaInstanceParameter[]>
[[-Database] <Object[]>]
[[-SqlCredential] <PSCredential>]
[[-PublicationType] <Object[]>]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbaRepPublication -SqlInstance sql2008, sqlserver2012
Return all publications for servers sql2008 and sqlserver2012.
PS C:\> Get-DbaRepPublication -SqlInstance sql2008 -Database TestDB
Return all publications on server sql2008 for only the TestDB database
PS C:\> Get-DbaRepPublication -SqlInstance sql2008 -PublicationType Transactional
Return all publications on server sql2008 for all databases that have Transactional publications
The target SQL Server instance or instances.
Alias | |
Required | True |
Pipeline | true (ByValue) |
Default Value |
The database(s) to process. If unspecified, all databases will be processed.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).
Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.
For MFA support, please use Connect-DbaInstance.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Limit by specific type of publication. Valid choices include: Transactional, Merge, Snapshot
Alias | |
Required | False |
Pipeline | false |
Default Value | |
Accepted Values | Transactional,Merge,Snapshot |
byng this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |