Quantcast
Channel: Hyper-V forum
Viewing all articles
Browse latest Browse all 19461

ReIP VM's over the network with Powershell

$
0
0

Hi Experts,

We have a requirement here to re IP all our VM's as we are moving to a new data center.

While trying to do so, I found a very good script from vmnomad.blogspot.com which I later customized to our need.

Script is running fine with the required parameters & updates, but its not able to change the IP address, though it says, it changed the IP address.

Command syntax from PowerCLI: NewreIP1.ps1 -Inventory .\Test-Inventory5.csv -VC vCenter

Initially we had issues running the command:

his command syntax invoke-vmscript -ScriptText $changingIp -ScriptType bat -VM $vm.ServerName -GuestUser $vm.Username -GuestPassword $vm.Password using 'netsh.exe in the guest VM.

Later on its found that the script runs perfectly if we disable UAC for our test VM's.

With UAC enabled, it cannot run.

We need to disable UAC for 300 plus VM's & if we do so, we need to restart as well, which is not possible in one go.

Is there a way to disable UAC for all the VM's & run something like 'net stop server && net start server '& avoid restart through Power shell or by any means?

Please let me know, that would be very helpful.

Thanks

Arindam


Viewing all articles
Browse latest Browse all 19461

Trending Articles



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