Thanks Robert! I didn't realize I got an older version of PowerCLI; now I have the current version.
Now I'm able to see the cmdlet set-vmguestnetworkinterface but running into problems trying to configure an IP address to eth0 interface of a Linux VM that has eth0, eth1, and eth2 interfaces:
PS C:\Program Files\VMware\Infrastructure\VIToolkitForWindows> get-vm <*****> |
Get-VMGuestNetworkInterface -HostUser <***> -HostPassword <**> -GuestUser <***> -GuestPassword <*****>
VMId : VirtualMachine-368
SubnetMask :
NicId : VirtualMachine-368/4000
Name : eth0
IPPolicy : Dhcp
Ip :
Dns : {##.###.###.###, ##.##.##.##}
DefaultGateway :
Description : Ethernet
Mac : ######
RouteInterfaceId : eth0
DnsPolicy : Dhcp
WinsPolicy :
Wins :
VMId : VirtualMachine-368
SubnetMask :
NicId : VirtualMachine-368/4001
Name : eth1
IPPolicy : Dhcp
Ip :
Dns : {#######}
DefaultGateway :
Description : Ethernet
Mac : ######
RouteInterfaceId : eth1
DnsPolicy : Dhcp
WinsPolicy :
Wins :
VMId : VirtualMachine-368
SubnetMask :
NicId : VirtualMachine-368/4002
Name : eth2
IPPolicy : Dhcp
Ip :
Dns : {#####}
DefaultGateway :
Description : Ethernet
Mac : ######
RouteInterfaceId : eth2
DnsPolicy : Dhcp
WinsPolicy :
Wins :
VMId : VirtualMachine-368
SubnetMask : 255.0.0.0
NicId :
Name : lo
IPPolicy : Dhcp
Ip : 127.0.0.1
Dns : {######}
DefaultGateway :
Description : Local Loopback
Mac :
RouteInterfaceId : lo
DnsPolicy : Dhcp
WinsPolicy :
Wins :
PS C:\Program Files\VMware\Infrastructure\VIToolkitForWindows> Set-VMGuestNetwor
kInterface -VmGuestNetworkInterface eth0 -vm <***> -GuestUser <**> -GuestPassw
ord <***> -ip <***> -netmask <***> -gateway <****>
Set-VMGuestNetworkInterface : Cannot bind parameter 'VmGuestNetworkInterface'.
Cannot convert the "eth0" value of type "System.String" to type "VMware.VimAuto
mation.Types.VMGuestNetworkInterface".
At line:1 char:53
+ Set-VMGuestNetworkInterface -VmGuestNetworkInterface <<<< eth0 -vm <**> -
GuestUser <**> -GuestPassword <**> -ip <*> -netmask <*> -gateway <**>
+ CategoryInfo : InvalidArgument: (:smileyhappy: [Set-VMGuestNetworkInterfac
e], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,VMware.VimAutomat
ion.VimAutomation.Commands.SetVmGuestNetworkInterface
Anyone have any ideas how to resolve this exception? Thanks in advance! :smileyhappy: