I am using vsphere and also esx v4.0 servers. I want to change the ip address of the esx host as we are moving to a new subnet. Is there a way to do this in powercli.
Yes, you can change the ip address of an esx host with the Set-VMHostNetworkAdapter cmdlet.
Regards, Robert
I suspect you will also need the Set-VMHostNetwork cmdlet to change the console gateway.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
how would use this cmdlet to change the ip address of the esx host.
I would advise to make a new console with the new IP address instead of changing the current one.
Once the new console is working, you remove the old one.
Otherwise you risk loosing connectivity to the ESX server.
New-VMHostNetworkAdapter -VMHost $esx -VirtualSwitch $vsw -PortGroup "Service Console 2" -IP 192.168.0.1 -SubnetMask 255.255.255.0 -ConsoleNic
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
We can make a new service console via the VI client, or is advised to create through the powercli. Also can you add the second service console on the same vswitch or create a new vswitch and add the new service console from there.
You can chose either, but since you're writing a script why not do everything from a script.
You can add a 2nd console to the same switch.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference