查看Lync前端服务器登录(负载平衡时检查是否成功)-创新互联

#Defined Connection String
$connstring = "server=lync\rtclocal;database=rtcdyn;
trusted_connection=true;"
$connstring2 = "server=lync2\rtclocal;database=rtcdyn;

trusted_connection=true;"

目前创新互联建站已为成百上千家的企业提供了网站建设、域名、网站空间、网站改版维护、企业网站设计、银海网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

#Define SQL Command

$command = New-Object System.Data.SqlClient.SqlCommand

$command.CommandText = "Select (cast (RE.ClientApp as
varchar (100))) as ClientVersion,

R.UserAtHost as UserName,
Reg.Fqdn

From
rtcdyn.dbo.RegistrarEndpoint RE

Inner Join
rtc.dbo.Resource R on R.ResourceId = RE.OwnerId

Inner Join
rtcdyn.dbo.Registrar Reg on Reg.RegistrarId =

RE.PrimaryRegistrarClusterId `
Order By ClientVersion, UserName "

#Make the connection to Server 1

$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connstring
$connection.Open()

$command.Connection = $connection

$sqladapter = New-Object System.Data.SqlClient.SqlDataAdapter
$sqladapter.SelectCommand = $command

$results = New-Object System.Data.Dataset

$recordcount=$sqladapter.Fill($results)

$connection.Close()

$overallrecords = $overallrecords + $Results.Tables[0]

#Make the connection to Server 2

$connection.ConnectionString = $connstring2
$connection.Open()

$command.Connection = $connection

$results = New-Object System.Data.Dataset
$recordcount=$sqladapter.Fill($results)

$connection.Close()

$overallrecords = $overallrecords + $Results.Tables[0]

#End Section 2

$overallrecords | Export-Csv "PoolDistribution.csv"
Write-Host -ForegroundColor Green "Query complete"

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


当前题目:查看Lync前端服务器登录(负载平衡时检查是否成功)-创新互联
网页地址:http://myzitong.com/article/dddseg.html