Get-ReplPublication

Gets a Publication.

Syntax

Get-ReplPublication [-replServer] <Object> [<CommonParameters>]

Detailed Description

The Get-ReplPublication function gets the publications on the specified ReplServer.

Related Commands

* Get-ReplPublication
* Get-ReplServer

Parameters

Name Description Required? Pipeline Input Default Value
replServer  ReplServer can be a string representing the server or a ReplicationServer object returned from Get-ReplServer.  true  false   

Input Type

None You cannot pipe objects to Get-ReplPublication

Return Values

Microsoft.SqlServer.Replication.TransPublication or Microsoft.SqlServer.Replication.MergePublication Depending on the publication type Get-ReplPublication returns either a Microsoft.SqlServer.Replication.TransPublication or Microsoft.SqlServer.Replication.MergePublication object

Examples

EXAMPLE 1

Get-ReplPublication "Z002\sql2K8"
This command gets the publications for SQL Server Z002\SQL2K8.

EXAMPLE 2

Get-ReplPublication $(Get-ReplServer "Z002\SQL2K8" sa Passw0rd)
This command gets the publications for SQL Server Z002\SQL2K8 using SQL authentication.