In the Tridion Management Console in 2013 we can configure a publisher server for publishing to stage and another for publishing to live, by adding the publishing target tcmid into the Publication Targets field.
So how do we do that in Tridion 8.5 with Topology?
SDL 8.5 Documentation for Queue settings
"You can configure a host to only process messages for a specific Publication Target"
Where do I get a publication target tcmid for the filter?
Edit: Queried the database to get Publication Targets.
SELECT 'tcm:0-' + CAST( [ID] as varchar(10)) + '-65537' as 'tcmid' ,[TITLE]
FROM [Tridion_cm].[dbo].[PUBLICATION_TARGETS]
where IS_EMULATED = 1
Is this really the recommended way to find the Publication Target data for configuring Publishers?
Edit:
PowerShell Solution
#
# GetBPTPublishingTargets.ps1
#
<#
.Synopsis
Get BPT Publishing Targets
.DESCRIPTION
Queue Publisher filtering in Tridion 8.5
There is no GUI to show Business Process Type Publishing Target Type for Publication Filtering
https://tridion.stackexchange.com/questions/19363/queue-publisher-filtering-in-tridion-8-5/19451#19451
.EXAMPLE
Example of how to use this cmdlet
.INPUTS
None
.OUTPUTS
GridView
.NOTES
Produced by Chris Mills Tridionation Ltd
[email protected] 07768805566
#>
$modulename = "SQLPS"
if (Get-Module -ListAvailable -Name $modulename ) {
#Write-Host "$modulename already installed"
Import-Module -Name $modulename
}
else {
$modulename = "SqlServer"
if (Get-Module -ListAvailable -Name $modulename ) {
Write-Host "$modulename already installed"
}
else {
# Install the installer
if (-not(Get-Module -ListAvailable -Name PowerShellGet)) {
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
}
Install-Module -Name $modulename -Force
}
Import-Module -Name $modulename
}
if (-not $setupOptions) {
Write-Error "Please initialse setupOptions"
break
}
if (-not $credential) {
$credential = Get-Credential -Message "Remote Server Tridion Administrator SUP Account"
}
$tridion_cm = $setupOptions.CM_DB_NAME
$GetBPTPublishingTargetsTemplate = @"
SELECT 'tcm:0-' + CAST( [ID] as varchar(10)) + '-65537' as 'tcmid' ,[TITLE] as 'Publication Target'
FROM [$tridion_cm].[dbo].[PUBLICATION_TARGETS]
where IS_EMULATED = 1
"@
$GetBPTPublishingTargets | Out-Null
$DatabaseComand = @{
Query = ""
Database = $setupOptions.CM_DB_NAME
ServerInstance = $setupOptions.CM_DB_HOST
UserName = $setupOptions.SA_ACCOUNT_NAME
Password = $setupOptions.SA_PASSWORD
}
try {
$DatabaseComand.query = $ExecutionContext.InvokeCommand.ExpandString($GetBPTPublishingTargetsTemplate)
$result = Invoke-Sqlcmd @DatabaseComand
$title = "SDL* Business Process Types Target Type ID - Tridionation Ltd 2018"
$result | Out-GridView -Title $title
}
catch {
Write-Output "SQL Query Error"
Write-Output $error
}