다음을 통해 공유


Como listar o Routing Groups do Lync Server 2103

Um das novidades do Lync Server 2013 são os Routing Groups, mais detalhes vocês encontram em:(https://blogs.technet.com/b/rischwen/archive/2014/02/24/lync-2013-high-availability-deep-dive-architecture.aspx).

Atualmente, não existem cmdlets que mostram detalhes dos Routing Groups, nem mesmo listam eles. Pois isso, consolidei o conteúdo de várias fontes e gerei um script PowerShell que conecta no SQL Server e apresenta a lista dos Routing Groups, nome do servidor Front End e usuários associados ao Routing Group.

Para rodar o script abaixo, basta modificar a primeira linha do script ($SqlServer = ), usando o format “FrondEndServer\SQLInstance”.

#***** Inicio do script *******

$SqlServer = "lyncent01\rtclocal"
$SqlDatabase = "rtc"
    
$SqlQuery = "Select RoutingGroupAssignment.RoutingGroupName, FrontEnd.Fqdn, Resource.UserAtHost from [rtc].[dbo].ResourceDirectory
INNER JOIN [rtc].[dbo].Resource
ON ResourceDirectory.ResourceId=Resource.ResourceId
INNER JOIN [rtc].[dbo].RoutingGroupAssignment
ON ResourceDirectory.RoutingGroupId=RoutingGroupAssignment.RoutingGroupId
INNER JOIN [rtc].[dbo].FrontEnd
ON RoutingGroupAssignment.FrontEndId=FrontEnd.FrontEndId
ORDER BY [rtc].[dbo].RoutingGroupAssignment.RoutingGroupId"

$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = "Server = $SqlServer; Database =
$SqlDatabase; Integrated Security = True"
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlCmd.CommandText = $SqlQuery
$SqlCmd.Connection = $SqlConnection
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $SqlCmd
$DataSet = New-Object System.Data.DataSet
$SqlAdapter.Fill($DataSet)
$SqlConnection.Close()
Clear
#output the data
$DataSet.Tables[0]

#***** Final do script *******

O resultado esperado é algo como:

RoutingGroupName Fqdn UserAtHost
---------------- ---- ----------
fd09e63c-8643-5799-bd0c-9bd54af88858 LYNCENT03.contoso.com RtcApplication-3dd1..
fd09e63c-8643-5799-bd0c-9bd54af88858 LYNCENT03.contoso.com GC-1-PersistentChat..
fd09e63c-8643-5799-bd0c-9bd54af88858 LYNCENT03.contoso.com Yan@contoso.com
cc509a2a-6ebc-50e2-9ee1-140cf72076bb LYNCENT01.contoso.com Jeff@contoso.com
406f2b07-bb5b-563c-a588-ae387660b98b LYNCENT01.contoso.com Jim@contoso.com
a83fca89-c2a8-56fb-9a38-9f8ec8e2a983 LYNCENT03.contoso.com Jon@contoso.com
255e1329-a560-52b2-98d3-67c49ec81d38 LYNCENT02.contoso.com Mike@contoso.com
94a40ddd-e63d-50b7-a8b8-b8733245053b LYNCENT02.contoso.com Nate@contoso.com
5ea41329-5003-560a-bd08-90f2cfa2560e LYNCENT02.contoso.com Toby@contoso.com

Ref.: https://blogs.technet.com/b/rischwen/rss.aspx