Setting UrlSegmentMaxLength from commadline
问题 Is there a way to set the UrlSegmentMaxLength value for Http.sys using appcmd/netsh or any other commandline utility? 回答1: I change this for my deployment in powershell Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Services\HTTP\Parameters -Name UrlSegmentMaxLength -Value 500 Restart-Service W3SVC -Force 回答2: I realize this is an old question, but in case someone stumbles upon this, here's PowerShell one-liner that either creates the key and sets the value or updates existing value.