Of all the vSwitch properties, the Offload Policy settings are the most obscure. You can’t even view them through the GUI. You can see them in the /etc/vmware/esx.conf file, or using the Powershell VI Toolkit, if you know how to use this command:
((Get-VMHostNetwork ESXSERVER | Get-View).NetworkConfig.vSwitch | Where {$_.Name -eq “vSwitch1″}).Spec.Policy.OffloadPolicy
I told you it’s obscure…
Changing the settings is even more difficult, as the method that allows you to do so, requires almost every possible property to be set, even if you don’t want to change it. So, I thought I’d make it a bit more simple. How about the following command:
Set-MyOffloadPolicy -VMHost ESXSERVER -vSwitch “vSwitch1″ -TcpSegmentation Off
All you need is to connect to your VIServer and make sure this function is loaded:
Set-MyOffloadPolicy (rename to .ps1 or copy into your profile)
Hope you like it!
One Response to Modifying vSwitch Offload Policy with Powershell
Tags
Active Directory API bind order cleanup cluster CPU Custom Fields datastores description device management directory tree errors Event Log file name filter Fun function HA IT known issues License Server LUN multipath NIC objects Oneliner portgroups PowerCLI PowerShell profile recursive Registry Scripts security session share snapshots SQL Stat VI Toolkit VMware vSphere WMI WSUS ZenArchives
- July 2012
- July 2011
- February 2011
- January 2011
- December 2010
- May 2010
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008





[...] PowerShell, but finding the process of modifying Offload Policies too difficult? This should help out [...]