Q.Token Size 過大導致 WinRM 驗證失敗?
Error Message:採用 Domain Admins 群組所屬的管理者帳號登入主機,但是在進行驗證的過程中居然會發生失敗的情況,手動使用 winrm 指令的話便會發生如下錯誤訊息。最後在主機兩端之間去抓取封包,可以發現有一段關鍵字「HTTP/1.1 400 Bad Request」
C:\> winrm id -r:hv01.weithenn.org
WSManFault
Message = The WinRM Client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The Content type is absent or invalid.
Error number: -2144108297 0x803380F7
The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid.Ans:
詳細資訊請參考 Microsoft KB970875 - Large Kerberos tokens cause WinRM requests to fail、Microsoft KB327825 - Problems with Kerberos authentication when a user belongs to many groups、Microsoft KB920862 - Error message when an Outlook Web Access user tries to access a mailbox in Exchange Server 2003: “HTTP 400 Bad Request (Request header too long)” 文章內容。
簡單來說,問題的原因在於網域當中「使用者帳號、群組、委派...等過多」,造成用於 Kerberos Token 過大所導致的,解法有兩種。首先,治本的方法就是要重新規劃好網域當中使用者帳號、群組、委派...等過多的問題,讓 Kerberos Token 可以從根本縮小,但是相信這個方法應該很難執行了。
治標的方法,則是在所有需要用到驗證的主機中,在其機碼加上下列二筆路徑及相關的值即可解決: 詳細資訊請參考 Microsoft KB820129 - Http.sys registry settings for Windows
詳細資訊請參考 Microsoft KB970875 - Large Kerberos tokens cause WinRM requests to fail、Microsoft KB327825 - Problems with Kerberos authentication when a user belongs to many groups、Microsoft KB920862 - Error message when an Outlook Web Access user tries to access a mailbox in Exchange Server 2003: “HTTP 400 Bad Request (Request header too long)” 文章內容。
簡單來說,問題的原因在於網域當中「使用者帳號、群組、委派...等過多」,造成用於 Kerberos Token 過大所導致的,解法有兩種。首先,治本的方法就是要重新規劃好網域當中使用者帳號、群組、委派...等過多的問題,讓 Kerberos Token 可以從根本縮小,但是相信這個方法應該很難執行了。
治標的方法,則是在所有需要用到驗證的主機中,在其機碼加上下列二筆路徑及相關的值即可解決: 詳細資訊請參考 Microsoft KB820129 - Http.sys registry settings for Windows
- MaxFieldLenth
- MaxRequestBytes


