Running netsh in ConfigMgr task sequence on x64 client
In deploying Windows 7 x64 via a ConfigMgr 2007 SP2 task sequence I have a custom script to change the TCP Global Receive Window Auto-Tuning Level. The command that is executed via the script is:
cmd /c netsh interface tcp set global autotuning=highlyrestricted
This unfortunately returned the following error:
Set global command failed on IPv4 The parameter is incorrect
Since ConfigMgr 2007 task sequences execute as a 32-bit process, and by default use 64-bit file redirection, the shell process in use is C:\Windows\SysWOW64\cmd.exe (which is the 32-bit version on a 64-bit client). By setting the option Disable 64-bit file system redirection on the Run Command Line task, the shell process used is C:\Windows\System32\cmd.exe (the 64-bit process). When the same command is executed in this context, it simply returns the expected, "Ok."
See the Windows Core Networking post, Receive Window Auto-Tuning on Vista, for more information about this setting and why you may need to change it in some circumstances.
The attached file includes my custom WSF script for this.
Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use .
Comments
Anonymous
January 01, 2003
Thanks for the reminder, Troy! I had originally meant to include a reference and obviously forgot it. I just updated the post with a linked article that explains in greater detail the potential scenario. Let me know if you want more detail/clarification. I also have a WSF script that I hope to post soon that actually does this work as well as some additional logging.Anonymous
July 28, 2010
You don't hear much about having to adjust the TCP window-size...just curious as to why this needs to be done so often as to have this as a step in a Task Sequence. What was the scenario? Again, just curious...Thanks Aaron