I think changing the vswitch mtu values looks ok to do , the problems i have is changing the mtu value of the vmnic. Currently my port group name is vmkernal1, ip is 172.16.10.1, and subnet mask 255.255.255.0. The vmnic associated with this vswitch is vmnic1. So the below command :
Get-VMhost | Get-VirtualSwitch -Name | Get-VMHostNetworkAdapter -VMKernel | Set-VMHostNetworkAdapter -MTU 9000
this would change the vmnic mtu value to 9000.
I tried using the command :
Get-VMhost "esxserver1 | Get-VirtualSwitch -Name vswitch1 | Get-VMHostNetworkAdapter -VMKernel
but this gives me errors.
I want to know how in powershell how you can change the mtu value of a vmnic, given the below parameters:
esxserver - esxserver1
vswitch - vswitch1
portgroup- vmkernal1
vmnic - vmnic1
Any advice please