PowerShell Friday: Host Networking with PowerCLI
It has been too long since there was a PowerShell Friday, so I thought I treat you on some titbits on checking your host network configuration.
Check for MTU Mismatches
For various reasons you might want to know how your MTU size is configured on various components. Since it is important that every component in the link between the host
Get-VMHost | Get-VMHostNetwork | Select Hostname, VMKernelGateway -ExpandProperty VirtualNic | Select Hostname, PortGroupName, IP, MTU
// Shows what the MTU settings on the Virtual Switches are
Get-VirtualSwitch | Select VMHost, Name, MTU
Dump host information
// Dumps a hosts Name, IP, Subnet, Gateway and DNS configuration
Get-VMGuestNetworkInterface –VM VMNAME | Select VM, IP, SubnetMask, DefaultGateway, Dns