在 Lync Server 2013 中測試群組 IM 的能力Testing ability to do group IM in Lync Server 2013

 

主題上次修改日期: 2014-06-05Topic Last Modified: 2014-06-05

驗證排程Verification schedule

每日Daily

測試控管Testing tool

Windows PowerShellWindows PowerShell

必要的權限Permissions required

使用 Lync Server 管理命令介面在本機執行時,使用者必須是 RTCUniversalServerAdmins 安全性群組的成員。When run locally using the Lync Server Management Shell, users must be members of the RTCUniversalServerAdmins security group.

使用 Windows PowerShell 的遠端實例執行時,必須為使用者指派具有執行 Test-CsGroupIM Cmdlet 許可權的 RBAC 角色。When run using a remote instance of Windows PowerShell, users must be assigned an RBAC role that has permission to run the Test-CsGroupIM cmdlet. 若要查看可使用此 Cmdlet 的所有 RBAC 角色清單,請從 Windows PowerShell prompt 中執行下列命令:To see a list of all RBAC roles that can use this cmdlet, run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets -match "Test-CsGroupIM"}

描述Description

Test-CsGroupIM Cmdlet 會驗證組織中的使用者是否可以進行群組立即訊息會話。The Test-CsGroupIM cmdlet verifies that users in your organization can conduct group instant messaging sessions. 當您執行 Test-CsGroupIM,指令 Cmdlet 會嘗試將一對測試使用者登入 Lync Server。When you run Test-CsGroupIM, the cmdlet attempts to sign in a pair of test users to Lync Server. 如果成功,Test-CsGroupIM 會使用第一個測試使用者建立新的會議,然後邀請第二個使用者加入該會議。If successful, Test-CsGroupIM creates a new conference using the first test user, then invites the second user to join the conference. 交換訊息之後,兩個使用者都會中斷與系統的連線。After an exchange of messages, both users are then disconnected from the system. 請注意,所有的動作都沒有任何使用者互動,也不會影響任何實際的使用者。Note that all of this happens without any user interaction, and without affecting any actual users. 例如,假設「測試帳戶 sip:kenmyer@litwareinc.com」會對應至具有實際 Lync 伺服器帳戶的實際使用者。For example, suppose that the test account sip:kenmyer@litwareinc.com corresponds to a real user who has a real Lync Server account. 在該情況下,測試將會在不干擾實際的 Ken Myer 的情況下進行。In that case, the test will be conducted without any disruption to the real Ken Myer. 例如,即使在 Ken Myer 測試帳戶從系統登出時,Ken Myer 這個人仍然維持登入狀態。For example, even when the Ken Myer test account logs off from the system, Ken Myer the person will remain logged on. 同樣地,real Ken Myer 不會收到加入會議的邀請。Likewise, the real Ken Myer won't receive an invitation to join the conference. 該邀請將會傳送到測試帳戶,並由測試帳戶接受。That invitation will be sent to, and accepted by, the test account.

如需詳細資訊,請參閱 Test-CsGroupIM Cmdlet 的說明文件。For more information, see the Help documentation for the Test-CsGroupIM cmdlet.

執行測試Running the test

您可以使用一對預先設定的測試帳戶來執行 Test-CsGroupIM Cmdlet (請參閱設定測試帳戶以執行 Lync Server 測試) 或任何兩個已啟用 Lync Server 之使用者的帳戶。The Test-CsGroupIM cmdlet can be run using either a pair of preconfigured test accounts (see Setting Up Test Accounts for Running Lync Server Tests) or the accounts of any two users who are enabled for Lync Server. 若要使用測試帳戶執行此檢查,您只需要指定所測試之 Lync Server 集區的 FQDN。To run this check using test accounts, you just have to specify the FQDN of the Lync Server pool being tested. 例如:For example:

Test-CsGroupIM -TargetFqdn "atl-cs-001.litwareinc.com"

若要使用實際使用者帳戶執行這項檢查,您必須建立兩個 Lync Server 管理命令介面認證物件 (包含每個帳戶的帳戶名稱和密碼) 的物件。To run this check using actual user accounts, you must create two Lync Server Management Shell credentials objects (objects that contain the account name and password) for each account. 當您呼叫 Test-CsGroupIM 時,您必須包含這兩個帳戶的認證物件和 SIP 位址:You must then include those credentials objects and the SIP addresses of the two accounts when you call Test-CsGroupIM:

$credential1 = Get-Credential "litwareinc\kenmyer"
$credential2 = Get-Credential "litwareinc\davidlongmire"
Test-CsGroupIm -TargetFqdn "atl-cs-001.litwareinc.com" -SenderSipAddress "sip:kenmyer@litwareinc.com" -SenderCredential $credential1 -ReceiverSipAddress "sip:davidlongmire@litwareinc.com" -ReceiverCredential $credential2

如需詳細資訊,請參閱 Test-CsGroupIM Cmdlet 的說明文件。For more information, see the Help documentation for the Test-CsGroupIM cmdlet.

決定成功或失敗Determining Success or Failure

如果兩位使用者可以完成群組立即訊息會話,則會收到與結果屬性標示為 [成功] 的輸出 If the two users can complete a group instant messaging session, you'll receive output similar to this with the Result property marked as Success:

TargetFqdn: atl-cs-001.litwareinc.comTargetFqdn : atl-cs-001.litwareinc.com

結果:成功Result : Success

延遲:00:00:06.3812203Latency : 00:00:06.3812203

錯誤:Error :

診斷:Diagnosis :

如果兩位使用者無法完成立即訊息會話,則結果會顯示為失敗,而且會在錯誤和診斷屬性中記錄其他資訊:If the two users can't able to complete the instant messaging session, then the Result will be shown as Failure, and additional information will be recorded in the Error and Diagnosis properties:

TargetFqdn: atl-cs-001.litwareinc.comTargetFqdn : atl-cs-001.litwareinc.com

結果:失敗Result : Failure

延遲:00:00:00Latency : 00:00:00

錯誤:404,未找到Error : 404, Not Found

診斷: ErrorCode = 4005、Source = atl-cs-001.litwareinc.com、Diagnosis : ErrorCode=4005,Source=atl-cs-001.litwareinc.com,

原因 = 未啟用 SIP 的目的 URI 或不是Reason=Destination URI either not enabled for SIP or does not

存在。exist.

DiagnosticHeader。Microsoft.Rtc.Signaling.DiagnosticHeader

先前的輸出指出測試失敗的原因是至少一個測試帳戶無效,原因是該帳戶不存在,或是尚未啟用 Lync Server 的使用者。The previous output states that the test failed because at least one of the test accounts was not valid, either because the account does not exist or because the user has not been enabled for Lync Server. 您可以透過執行類似如下的命令,確認帳戶是否存在,以及帳戶是否已啟用的帳戶已啟用。You can verify the account exists, and whether or not the account has been enabled for nm-ocs-14-3rd by running a command similar to this:

"Ken Myer", "David Longmire" | Get-CsUser | Select-Object SipAddress, Enabled

如果 Test-CsGroupIM 失敗,則您可能想要重新執行測試,這次包括 Verbose 參數:If Test-CsGroupIM fails, then you might want to rerun the test, this time including the Verbose parameter:

Test-CsGroupIM -TargetFqdn "atl-cs-001.litwareinc.com" -Verbose

包含 Verbose 參數時,Test-CsGroupIM 會傳回每個動作所嘗試的每個動作的逐步帳戶,檢查指定使用者是否可以加入群組立即訊息會話。When the Verbose parameter is included, Test-CsGroupIM will return a step-by-step account of each action it tried when it checked the ability of the specified users to participate in a group instant messaging sessions. 例如,如果測試失敗,而且您已告知一或多個使用者帳戶無效,您可以使用 Verbose 參數來重新執行測試,並判斷哪個使用者帳戶無效:For example, if your test fails and you are told that one or more of the user accounts is not valid, you can rerun the test using the Verbose parameter and determine which user account is not valid:

傳送註冊要求:Sending Registration request:

 目標 Fqdn = atl-cs-001.litwareinc.comTarget Fqdn      = atl-cs-001.litwareinc.com

 使用者 SIP 位址 = sip:kenmyer@litwareinc.comUser SIP Address = sip:kenmyer@litwareinc.com

 寄存器埠 = 5061Register Port    = 5061

已選取驗證類型 ' IWA '。Auth type 'IWA' is selected.

「登入已遭拒絕」例外狀況。An exception 'The log on was denied. 請檢查是否已使用正確的認證,且帳戶為使用中。Check that the correct credentials are being used and the account is active'

如您所見,在此範例中,具有 SIP 位址 sip:kenmyer@litwareinc.com 的使用者無法登入。As you can see, in this example the user who has the SIP address sip:kenmyer@litwareinc.com was not able to log on.

測試可能失敗的原因Reasons why the test might have failed

以下是一些 Test-CsGroupIM 可能失敗的常見原因:Here are some common reasons why Test-CsGroupIM might fail:

  • 您指定了錯誤的使用者帳戶。You specified an incorrect user account. 您可以執行類似如下的命令,以確認使用者帳戶是否存在:You can verify that a user account exists by running a command similar to this:

    Get-CsUser "sip:kenmyer@litwareinc.com"
    
  • 使用者帳戶有效,但目前未啟用 Lync Server 的帳戶。The user account is valid, but the account is currently not enabled for Lync Server. 若要確認已啟用 Lync Server 的使用者帳戶,請執行類似下列的命令:To verify that a user account was enabled for Lync Server, run a command similar to the following:

    Get-CsUser "sip:kenmyer@litwareinc.com" |Select-Object 啟用Get-CsUser "sip:kenmyer@litwareinc.com" | Select-Object Enabled

    如果 Enabled 屬性設定為 False,表示目前未啟用 Lync Server 的使用者。If the Enabled property is set to False, that means that the user is currently not enabled for Lync Server.

  • 立即訊息服務可能無法使用。The instant messaging service might not be available. 透過 Lync Server,您可以設定系統,以便在無法存取封存資料庫時,立即訊息無法使用。With Lync Server, you can configure the system so that instant messaging is not available if the archiving database cannot be accessed. 您可以執行類似下列的命令來確認:You can verify that by running a command similar to the following:

    Get-CsArchivingConfiguration -Identity "atl-cs-001.litwareinc.com" | Select-Object BlockOnArchiveFailure
    

    如果 BlockOnArchiveFailure 設定為 True,則應該決定封存資料庫是否可用。If BlockOnArchiveFailure is set to True, then you should determine whether or not the archiving database is available. 您可以使用下列命令回到封存資料庫的位置:You can return the locations of your archiving databases by using the following command:

    Get-CsService -ArchivingDatabase
    
  • 可能無法使用封存伺服器。The Archiving Server might not be available. 您可以使用下列命令來取得封存伺服器的 FQDN:You can retrieve the FQDN of your Archiving Servers by using this command:

    Get-CsService -ArchivingServer
    

    然後,您可以 ping 適當的伺服器以驗證其是否可供使用。You can then ping the appropriate server to verify that it is available. 例如:For example:

    ping atl-archiving-001.litwareinc.com