You can modify the IP and routing configuration settings of a guest network interface.

Connect to a vSphere server.


Get the network interface of a guest operating system.

$vm1 = Get-VM -Name VM1
$guest = Get-VMGuest $vm1
$interface = Get-VMGuestNetworkInterface -VMGuest $guest -HostUser root -HostPassword pass1 -GuestUser user -GuestPassword pass2 -ToolsWaitSecs 100

Configure the network interface.

Set-VMGuestNetworkInterface -VMGuestNetworkInterface $interface -HostUser root -HostPassword pass1 -GuestUser user -GuestPassword pass2 -IPPolicy static -IP -Gateway -DnsPolicy static -Dns (, -WinsPolicy dhcp