在 Lync Server 2013 中設定監視節點測試使用者和設定設定Configuring watcher node test users and configuration settings in Lync Server 2013

 

主題上次修改日期: 2013-07-29Topic Last Modified: 2013-07-29

在設定將充當監視節點的電腦之後,您必須:After configuring the computer that will act as a watcher node, you must:

  1. 建立這些觀察器節點要使用的測試帳戶。Create the test accounts to be used by these watcher nodes. 如果您使用 Negotiate 驗證方法,您也必須使用 Set-CsTestUserCredential Cmdlet 來啟用這些測試帳戶,以在監看員節點上使用。If you are using the Negotiate authentication method, you must also use the Set-CsTestUserCredential cmdlet to enable these test accounts for use on the watcher node.

  2. 更新監視節點的設定。Update the watcher node configuration settings.

本節涵蓋:This section covers:

  • 設定測試使用者帳戶Configuring Test User Accounts

  • 使用預設的綜合交易,設定基本的監看員節點Configuring a Basic Watcher Node with the Default Synthetic Transactions

  • 設定擴充測試Configuring Extended Tests

  • 新增及移除綜合交易Adding and Removing Synthetic Transactions

  • 查看及測試監視節點設定Viewing and Testing the Watcher Node Configuration

設定測試使用者帳戶Configuring Test User Accounts

測試使用者不需要表示實際人員,但必須是有效的 Active Directory 網域服務帳戶;此外,必須對 Lync Server 2013 啟用這些帳戶,他們必須具有有效的 SIP 位址,而且應為 Enterprise Voice (啟用這些帳戶,才能使用 Test-CsPstnPeerToPeerCall 綜合交易) 。Test users do not need to represent actual people, but they must be valid Active Directory Domain Services accounts; in addition, these accounts must be enabled for Lync Server 2013, they must have valid SIP addresses, and they should be enabled for Enterprise Voice (to use the Test-CsPstnPeerToPeerCall synthetic transaction). 如果您使用 TrustedServer 驗證方法,則您需要做的全部工作是確定這些帳戶都存在,且已依照這裡所指定的方式進行設定。If you use the TrustedServer authentication method, then all you need to do is to make sure that these accounts exist and have been configured as specified here. 您應為每個要測試的集區至少指派三個測試使用者。You should assign at least three test users for each pool that you want to test.

如果您使用 Negotiate 驗證方法,您也必須使用 Set-CsTestUserCredential Cmdlet 和 Lync Server 管理命令介面,讓這些測試帳戶能夠搭配綜合交易。If you are using the Negotiate authentication method, you must also use the Set-CsTestUserCredential cmdlet and the Lync Server Management Shell to enable these test accounts to work with the synthetic transactions. 您可以執行類似如下的命令來執行此動作。You can do this by running a command similar to the following. (這些命令會假設已建立三個 Active Directory 使用者帳戶,且已啟用這些帳戶的 Lync Server 2013。 ) :(These commands assume that the three Active Directory user accounts have already been created and that those accounts have been enabled for Lync Server 2013.):

Set-CsTestUserCredential -SipAddress "sip:watcher1@litwareinc.com" -UserName "litwareinc\watcher1" -Password "P@ssw0rd"
Set-CsTestUserCredential -SipAddress "sip:watcher2@litwareinc.com" -UserName "litwareinc\watcher2" -Password "P@ssw0rd"
Set-CsTestUserCredential -SipAddress "sip:watcher3@litwareinc.com" -UserName "litwareinc\watcher3" -Password "P@ssw0rd"

請注意,您不僅必須包含 SIP 位址,也必須包含使用者名稱和密碼。Note that you must include not only the SIP address but also the user name and password. 如果您未加入密碼 Set-CsTestUserCredential 會提示您輸入該資訊。If you do not include the password Set-CsTestUserCredential will prompt you to enter that information. 您可以使用 \ 如上所示的功能變數名稱使用者名稱格式指定使用者名稱,或使用 format user name@domain name; 例如:The user name can be specified using the domain name\user name format shown above, or by using the format user name@domain name; for example:

-UserName "watcher3@litwareinc.com"

若要確認已建立測試使用者認證,請在 Lync Server 管理命令介面中執行下列命令:To verify that the test user credentials were created, run these commands from within the Lync Server Management Shell:

Get-CsTestUserCredential -SipAddress "sip:watcher1@litwareinc.com"
Get-CsTestUserCredential -SipAddress "sip:watcher2@litwareinc.com"
Get-CsTestUserCredential -SipAddress "sip:watcher3@litwareinc.com"

針對每位使用者應傳回類似以下的資訊:Information similar to this should be returned for each user:

UserName                        Password
--------                        --------
Litwareinc\watcher1              System.Security.SecureString

使用預設的綜合交易,設定基本的監看員節點Configuring a Basic Watcher Node with the Default Synthetic Transactions

在建立測試使用者之後,您可以使用類似下列的命令來建立監看員節點:After the test users have been created you can then create a watcher node by using a command similar to this:

New-CsWatcherNodeConfiguration -TargetFqdn "atl-cs-001.litwareinc.com" -PortNumber 5061 -TestUsers @{Add= "sip:watcher1@litwareinc.com","sip:watcher2@litwareinc.com", "sip:watcher3@litwareinc.com"}

這個命令會建立新的監看員節點,使用預設設定,並執行預設的綜合交易集合。This command creates a new watcher node that uses the default settings and runs the default set of synthetic transactions. 新的監看員節點也會使用 test 使用者 watcher1@litwareinc.com、watcher2@litwareinc.com 及 watcher3@litwareinc.com。The new watcher node also uses the test users watcher1@litwareinc.com, watcher2@litwareinc.com, and watcher3@litwareinc.com. 如果監看員節點使用的是 TrustedServer 驗證,則三個測試帳戶可以是為 Active Directory 和 Lync Server 啟用的任何有效使用者帳戶。If the watcher node is using TrustedServer authentication, the three test accounts can be any valid user accounts enabled for Active Directory and Lync Server. 如果監看員節點使用 Negotiate 驗證方法,您也必須使用 Set-CsTestUserCredential Cmdlet 來啟用監看員節點的使用者帳戶。If the watcher node is using the Negotiate authentication method, you must also enable these user accounts for watcher node by using the Set-CsTestUserCredential cmdlet.

設定擴充測試Configuring Extended Tests

如果您想要啟用公用交換電話網路 (PSTN 測試) ,它會驗證與公用交換電話網路的連線,您必須在設定監看員節點時執行一些其他設定。If you want to enable the public switched telephone network (PSTN test), which verifies connectivity with the public switched telephone network, you will need to do some additional configuration when setting up the watcher node. 首先,您必須將測試使用者與 PSTN 測試類型產生關聯。First, you need to associate your test users with the PSTN test type. 若要這麼做,請在 Lync Server 管理命令介面中執行類似以下的命令:To do that, run a command similar to this from within the Lync Server Management Shell:

$pstnTest = New-CsExtendedTest -TestUsers "sip:watcher1@litwareinc.com", "sip:watcher2@litwareinc.com", "sip:watcher3@litwareinc.com"  -Name "Contoso Provider Test" -TestType PSTN

請注意,此命令的結果必須儲存在變數中。Note that the results of this command must be stored in a variable. 在此範例中,這是一個名為 $pstnTest 的變數。In this example, that's a variable named $pstnTest.

此時,您可以使用 New-CsWatcherNodeConfiguration Cmdlet,將 $pstnTest) 中儲存的測試類型 (關聯至 Lync Server 2013 集區。At this point, you can use the New-CsWatcherNodeConfiguration cmdlet to associate the test type (stored in the variable $pstnTest) to a Lync Server 2013 pool. 例如,下列命令會為集區 atl-cs-001.litwareinc.com 建立新的監看員節點設定,加入先前建立的三個測試使用者,也新增 PSTN 測試類型:For example, the following command creates a new watcher node configuration for the pool atl-cs-001.litwareinc.com, adding the three test users that were created previously, and also adding the PSTN test type:

New-CsWatcherNodeConfiguration -TargetFqdn "atl-cs-001.litwareinc.com" -PortNumber 5061 -TestUsers @{Add= "sip:watcher1@litwareinc.com","sip:watcher2@litwareinc.com", "sip:watcher3@litwareinc.com"} -ExtendedTests @{Add=$pstnTest}

請注意,如果您尚未在監看員節點電腦上安裝 Lync Server 核心檔案和 RTCLocal 資料庫,上述命令將會失敗。Note that the preceding command will fail if you have not installed the Lync Server core files and the RTCLocal database on the watcher node computer.

若要測試多種語音原則,您必須使用 New-CsExtendedTest Cmdlet,為每個原則建立擴充測試。To test multiple voice policies, you need to create an extended test for each policy by using the New-CsExtendedTest cmdlet. 指派給此測試的使用者應以所需的語音原則加以設定。The users assigned to this test should be configured with the desired voice policies. 然後,您可以使用類似下列的命令,將延伸的測試傳遞至 New-CsWatcherNodeConfiguration Cmdlet:The extended tests are then passed to the New-CsWatcherNodeConfiguration cmdlet by using a command similar to the following:

-ExtendedTests @{Add=$pstnTest1,$pstnTest2,$pstnTest3}

如果不使用 [測試] 參數呼叫 New-CsWatcherNodeConfiguration,表示只有預設的綜合交易 (,且會為新的監看員節點啟用指定的延伸綜合交易) 。If New-CsWatcherNodeConfiguration is called without using the Tests parameter, that means that only the Default synthetic transactions (and the specified extended synthetic transaction) will be enabled for the new watcher node. 這表示觀察程式節點會測試下列元件:This means that the watcher node will test the following components:

  • 註冊Registration

  • IM

  • GroupIMGroupIM

  • P2PAV (對等音訊/視頻會話) P2PAV (peer-to-peer audio/video sessions)

  • AvConference (音訊/會議) AvConference (audio/conferencing)

  • 目前狀態Presence

  • ABS (通訊錄服務) ABS (Address Book service)

  • ABWQ (通訊錄 web 服務) ABWQ (Address Book web service)

  • PSTN (PSTN 閘道通話,指定為延伸測試。PSTN (PSTN gateway calls, specified as an extended test. 預設會停用 PSTN。By default, PSTN is disabled. 在此情況下會啟用測試,只是因為命令已使用 ExtendedTests 參數啟用 PSTN。 ) The test is enabled in this case only because the command enabled PSTN by using the ExtendedTests parameter.)

這也意味著預設不會測試下列元件:This also means that the following components will not be tested by default:

  • AVEdgeConnectivityAVEdgeConnectivity

  • MCXP2PIM (行動裝置立即訊息) MCXP2PIM (mobile device instant messaging)

  • ExumConnectivity (Exchange 整合通訊) ExumConnectivity (Exchange Unified Messaging)

  • JoinLauncherJoinLauncher

  • PersistentChatMessagePersistentChatMessage

  • DataConferenceDataConference

  • XmppIMXmppIM

  • UnifiedContactStoreUnifiedContactStore

新增及移除綜合交易Adding and Removing Synthetic Transactions

在設定了監看員節點之後,您可以使用 Set-CsWatcherNodeConfiguration Cmdlet 來新增或移除節點中的綜合交易。After a watcher node has been configured, you can use the Set-CsWatcherNodeConfiguration cmdlet to add or remove synthetic transactions from the node. 例如,若要將 PersistentChatMessage 測試新增至監看員節點,請使用 Add 方法及類似如下的命令:For example, to add the PersistentChatMessage test to the watcher node, use the Add method and a command similar to this:

Set-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" -Tests @{Add="PersistentChatMessage"}

若要新增多個測試,您可以使用逗號分隔測試名稱。Multiple tests can be added by separating the test names by using commas. 例如:For example:

Set-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" -Tests @{Add="PersistentChatMessage","DataConference","UnifiedContactStore"}

請注意,如果其中一或多個測試 (例如,DataConference) 已經在監看員節點上啟用,就會發生錯誤。Note that an error will occur if one or more of these tests (for example, DataConference) has already been enabled on the watcher node. 在此情況下,您會收到類似下列的錯誤訊息:In this case, you will receive an error message similar to the following:

Set-CsWatcherNodeConfiguration : There is a duplicate key sequence 'DataConference' for the 'urn:schema:Microsoft.Rtc.Management.Settings.WatcherNode.2010:TestName' key or unique identity constraint.

發生此錯誤時,將不會套用任何變更。When this error occurs, no changes will be applied. 在移除重複的測試時,應重新執行該命令。The command should be rerun with the duplicate test removed.

若要移除來自觀察者節點的綜合交易,請使用 Remove 方法,而不要使用 Add 方法。To remove a synthetic transaction from a watcher node, use the Remove method instead of the Add method. 例如,下列命令會從監看員節點中移除 ABWQ 測試:For example, this command removes the ABWQ test from a watcher node:

Set-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" -Tests @{Remove="ABWQ"}

您也可以使用 Replace 方法,將所有目前啟用的測試取代為一或多個新的測試。You can also use the Replace method to replace all the currently-enabled tests with one or more new tests. 例如,如果您只想要在監看員節點上執行 IM 測試,您可以使用下列命令來設定該測試:For example, if you only want a watcher node to run the IM test, you can configure that by using this command:

Set-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" -Tests @{Replace="IM"}

當您執行上述命令時,將會停用指定的監看員節點上的所有綜合交易,但 IM 除外。When you run the preceding command, all synthetic transactions on the specified watcher node will be disabled except for IM.

查看及測試監視節點設定Viewing and Testing the Watcher Node Configuration

如果您想要查看已指派給觀察者節點的測試,請使用類似下列的命令:If you want to view the tests that have been assigned to a watcher node, use a command similar to this:

Get-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" | Select-Object -ExpandProperty Tests

上述命令會根據指派給節點的綜合交易,傳回類似以下的資訊:The preceding command will return information similar to this, depending on the synthetic transactions that have been assigned to the node:

Registration
IM
GroupIM
P2PAV
AvConference
Presence
PersistentChatMessage
DataConference

提示

若要依字母順序查看綜合交易,請改為使用此命令:To view the synthetic transactions in alphabetical order, use this command instead:
Get-CsWatcherNodeConfiguration –身分識別 "atl-cs-001.litwareinc.com" |Select-Object –ExpandProperty 測試 |Sort-ObjectGet-CsWatcherNodeConfiguration –Identity "atl-cs-001.litwareinc.com" | Select-Object –ExpandProperty Tests | Sort-Object

若要確認已建立監看員節點,請在 Lync Server 管理命令介面內輸入下列命令:To verify that a watcher node has been created, type the following command from within the Lync Server Management Shell:

Get-CsWatcherNodeConfiguration

您將會收到類似以下的資訊:You will receive information similar to this:

Identity      : atl-cs-001.litwareinc.com
TestUsers     : {sip:watcher1@litwareinc.com, sip:watcher2@litwareinc.com ...}
ExtendedTests : {TestUsers=IList<System.String>;Name=PSTN Test; Te...}
TargetFqdn    : atl-cs-001.litwareinc.com
PortNumber    : 5061

若要確認是否已正確設定觀察程式節點,請在 Lync Server 管理命令介面中輸入下列命令:To verify that the watcher node has been configured correctly, type the following command from within the Lync Server Management Shell:

Test-CsWatcherNodeConfiguration

上述命令會測試您部署中的每個監看員節點,並告訴您資訊,例如:The preceding command will test each watcher node in your deployment and tell you information, such as whether:

  • 已安裝必要的註冊器角色。The required Registrar role been installed.

  • 當您執行 Set-CsWatcherNodeConfiguration 時,會為您建立必要的登錄機碼。The required registry key was created for you when you ran Set-CsWatcherNodeConfiguration.

  • 您的伺服器正在執行正確版本的 Lync Server。Your servers are running the correct version of Lync Server.

  • 您的埠已正確設定。Your ports been configured correctly.

  • 您指派的測試使用者具備必要的認證。Your assigned test users have the required credentials.