Quantcast
Viewing all articles
Browse latest Browse all 193504

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

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 193504

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>