在 Lync Server 2013 中測試 Web 應用程式存取權Test Web App access in Lync Server 2013

 

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

驗證排程Verification schedule

每月Monthly

測試控管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-CsWebApp 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-CsWebApp 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-CsWebApp"}

描述Description

Test-CsWebApp Cmdlet 會驗證已驗證的使用者是否可以使用 Lync Web App 加入 Lync Server 會議。The Test-CsWebApp cmdlet verifies that authenticated users can join Lync Server conferences by using the Lync Web App. 當您執行 Cmdlet 時,Test-CsWebApp 會聯繫 Web Ticket 服務,以取得指定使用者的 Web 入場券。When you run the cmdlet, Test-CsWebApp contacts the Web Ticket service to obtain web tickets for the specified users. 這些入場券會有效地充當 Lync Server 會議的「許可票證」。These tickets effectively act as ‘admission tickets” to the Lync Server conference. 若可取得票證,而且如果使用者可驗證,則 Test-CsWebApp 會聯繫 Lync Server,並嘗試建立個別會議以進行立即訊息、應用程式共用及資料共同作業。If the tickets can be retrieved, and if the users can be authenticated, Test-CsWebApp will then contact Lync Server and attempt to establish separate conferences for instant messaging, application sharing, and data collaboration.

請注意,Test-CsWebApp 只會驗證用來建立這些會議的 APIs 和連線。Note that Test-CsWebApp just verifies the APIs and connections used to create these conferences. 此 Cmdlet 的設計目的是要驗證 Lync Web App 是否可用於建立及加入會議。The cmdlet is designed to verify that Lync Web App could be used to create and join conferences. 不過,它不會實際建立及召開會議。However,, it does not actually create and conduct a conference.

執行測試Running the test

您可以使用一組預先設定的測試帳戶或任何兩個啟用 Lync Server 之使用者的帳戶執行 Test-CsWebApp Cmdlet。The Test-CsWebApp cmdlet can be run using either a pair of preconfigured test accounts or the accounts of any two users who are enabled for Lync Server. 若要使用測試帳戶執行這項檢查,您只需要指定所測試之 Lync Server 集區的完整功能變數名稱。To run this check using test accounts, you just have to specify the fully qualified domain name of the Lync Server pool being tested. 例如:For example:

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

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

$cred1 = Get-Credential "litwareinc\kenmyer"
$cred2 = Get-Credential "litwareinc\pilar"

Test-CsWebApp -TargetFqdn atl-cs-001.litwareinc.com -UserSipAddress "sip:kenmyer@litwareinc.com" -UserCredential $cred1 -User2SipAddress "sip:pilar@litwareinc.com" -User2Credential $cred2

如需詳細資訊,請參閱 Test-CsWebApp Cmdlet 的 [說明] 主題。For more information, see the help topic for the Test-CsWebApp cmdlet. 請注意,Test-CsWebApp 已過時,無法在 Lync Server 2013 上使用。Note that Test-CsWebApp was deprecated for use on Lync Server 2013.

決定成功或失敗Determining success or failure

如果 Test-CsWebApp 可以將使用者加入其會議,此 Cmdlet 將會傳回測試結果成功:If Test-CsWebApp can join the users to their conferences, the cmdlet will return the test result Success:

目標 Fqdn:Target Fqdn :

結果:成功Result : Success

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

錯誤訊息:Error Message :

診斷:Diagnosis :

如果使用者無法加入必要的會議,則測試結果會標示為失敗。If the users cannot join the necessary conferences then the test result will be marked as Failure. 通常 Test-CsWebApp 也會報告詳細的錯誤訊息和診斷:Typically Test-CsWebApp will also report back a detailed error message and diagnosis:

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

結果:失敗Result : Failure

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

錯誤訊息:沒有為 Web-Ticket 服務接收任何回應Error Message : No response received for Web-Ticket service

診斷:未授權用戶端的 HTTP 要求Diagnosis : The HTTP request is unauthorized with client

驗證架構「Ntlm」。authentication scheme 'Ntlm'. 驗證The authentication

從伺服器收到的標頭是「協商,NTLM」。header received from the server was 'Negotiate,NTLM'.

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

Test-CsWebApp 失敗通常會涉及使用者驗證錯誤。Test-CsWebApp failures typically involve user authentication errors. 如果 Test-CsWebApp 失敗,您應該先確認指定的使用者具有有效的使用者帳戶,且已啟用 Lync Server。If Test-CsWebApp fails, you should first verify that the specified users have valid user accounts and are enabled for Lync Server. 您可以使用類似下列的命令來取得帳戶資訊:You can retrieve account information by using a command similar to this:

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

如果 Enabled 屬性不等於 True 或如果命令失敗,則表示使用者沒有有效的 Lync 伺服器帳戶。您也應該確認您提供給 Cmdlet 的密碼是有效的。If the Enabled property is not equal to True or if the command fails, that means that the user does not have a valid Lync Server account.You should also verify that the passwords that you supplied to the cmdlet are valid.