posh | Powershell‎ > ‎posh | SSRS‎ > ‎

posh.rs | remove.replication.SUPER.FAST

IF((Get-Module repl) -EQ $null){
    Import-Module sqlpsx
}

$repl = Get-Module repl
#$repl.ExportedFunctions

$local_repl_HQ = Get-ReplServer .
$local_repl_EMEA = Get-ReplServer -replServer .\EMEA
$local_repl_CN = Get-ReplServer -replServer .\CN

$sub_EMEA = Get-ReplSubscriberSubscription .\EMEA
$sub_CN = Get-ReplSubscriberSubscription .\CN

$pub_HQ = Get-ReplPublication .
#$pub_EMEA = Get-ReplPublication .\EMEA
#$pub_CN = Get-ReplPublication .\CN

$subScribS_HQ = $pub_HQ | %{Get-ReplSubscription -pub  $_}
$subScrib_0 = $subScribS_HQ[0]
$subScrib_1 = $subScribS_HQ[1]
$subScrib_2 = $subScribS_HQ[2]

#$pub_HQ | %{Get-ReplSubscription -pub  $_} | %{$_.REMOVE()}
#$pub_HQ | %{$_.REMOVE()}
#$sub_EMEA | %{$_.REMOVE()}
#$local_repl_EMEA.UninstallDistributor($true)
#$local_repl_CN.UninstallDistributor($true)
#$local_repl_HQ.UninstallDistributor($true)
Comments