PowerCLI (or alternative) script to change IP address for  VMWare VMs

msidnam
msidnam used Ask the Experts™
on
We are moving our whole virtual environment to a new datacenter and the datacenter is in a different IP subnet. I was hoping to use PowerCLI to change the IPs on all the VM's (about 100 of them) but it looks like  set-vmguestnetworkinteface has been deprecated.

I was wondering if anything else exists to be able to automate the change of the IPs on the VM's? I would need to change the IP, gateway, subnet and DNS.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
Deprecated doesn't mean disfunctional (yet), so you could still use the cmdlet for now ...

https://deangrant.wordpress.com/tag/set-vmguestnetworkinterface/ shows how to run the corresponding PS commands remotely against Windows VMs using Invoke-VMScript.

Author

Commented:
I used a combo of both your answers. I used the invoke-vmscript to run the netsh commands. the New-NetIPAddress command was giving me issues so i used the netsh commands.

Thank you both very much.

Author

Commented:
Thank you both. Let me know if the system didnt split the points. Ever since the new interface, when giving points to multiple solutions i find it confusing. i used to be able to set the amount of points.


thank you again.

Commented:
I'm glad it worked out!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial