Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 171074

Re: How to script changing IP and hostname on 600 Windows 2008 R2 (64bit) VM's

$
0
0

I would try the Set-VMGuestNetworkInterface cmdlet for the network part.

Something like this

 

1..600|%{
 
Get-VM-Name"Server$_"|Get-VMGuestNetworkInterface|
 
Set-VMGuestNetworkInterface-IPPolicyStatic-Ip192.168.1.1-Netmask255.255.255.0-Gateway192.168.1.254
}

For the hostname change, do you have PowerShell v3 installed in the guest OS ?

If yes, you can use the Invoke-VMScript cmdlet and just launch the Rename-Computer cmdlet in the guest OS.


Viewing all articles
Browse latest Browse all 171074

Trending Articles