PowerShell Remoting with Large Token Size

by Jan 1, 2014

The Kerberos token size depends on the number of group memberships. In some corporate environments with heavy use of group memberships, the token size can grow beyond the limits allowed for PowerShell remoting. In these scenarios, PowerShell remoting fails with a cryptic error message.

To enable PowerShell remoting, you can set two Registry values and increase the supported token size:

#Source: http://www.miru.ch/how-the-kerberos-token-size-can-affect-winrm-and-other-kerberos-based-services/
New-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\HTTP\Parameters -Name "MaxFieldLength" -Value 65335 -PropertyType "DWORD" 
New-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\HTTP\Parameters -Name "MaxRequestBytes" -Value 40000 -PropertyType "DWORD" 

Twitter This Tip! ReTweet this Tip!