Get-ReplSubscription

Gets a Subscription.

Syntax

Get-ReplSubscription [-pub] <Object> [<CommonParameters>]

Detailed Description

The Get-ReplSubscription function gets the subscriptions from the specified ReplServer.

Related Commands

* Get-ReplSubscription
* Get-ReplServer

Parameters

Name Description Required? Pipeline Input Default Value
pub    true  true (ByValue)   

Input Type

Microsoft.SqlServer.Replication.Publication You can pipe Publication objects to Get-ReplSubscription

Return Values

Microsoft.SqlServer.Replication.TransSubscription or Microsoft.SqlServer.Replication.MergeSubscription Depending on the publication type Get-ReplSubscription returns either a Microsoft.SqlServer.Replication.TransSubscription or Microsoft.SqlServer.Replication.MergeSubscription object

Examples

EXAMPLE 1

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

EXAMPLE 2

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