Replacing VMware’s powershell reip command-let (Set-VMGuestNetworkInterface).

Set-VMGuestNetworkInterface has several problems windows 2008 for example has both ipv4 and ipv6 this breaks vmwares bat files that it uses in the backend to reip the system. Several solutions have been posted on the internet to get around this flaw. But all have the same basic problem (they all use netsh). Netsh alone seems to be a little buggy. But the largest downfall with netsh is the need to specify a network name to reip. Well what if doing balk reip’s where the network name will be unknown, what if the virtual machine has more than one network? Easy I wrote my own powershell tool to replace this and wrote a java script that uses WMI not netsh. This script allows you to set the IP of the nic by the virtual network name. So the underlying nic name is irrelevant.
Enjoy!!!

To use place the netconfig.js file in the c:\scripts directory from the system you are running the set_vmnic.ps1 from. Any questions on arguments just launch the set_vmnic.ps1 from vmware powershell.

Also working on a “remove program” powershell script as well as a “rename/join domain” powershell script.

This blog for security reasons will not allow a script to be uploaded.
So please rename set_vmnic.ps1.doc to set_vmnic.ps1 and netconfig.js.doc to netconfig.js once downloaded. set_vmnic.ps1

Advertisement
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s