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

Assign IP-address to Hyper-V VM via script during deployment

$
0
0

Hi All,

Does anybody know of a way to leverage powershell to assign a static ip-addr to a 2012 R2 Hyper-V virtual machine ( Windows for instance) when creating the VM thru powershell ?

We are looking to automate the process of creating a VM via a powershell script. My script uses the New-VM cmdlet to create the VM itself and then power it ON.  But how do i further assign an ip to the VM to be able to connect to it remotely?

The "New-NetIPAddress" cmdlet wont work in this case as this being a new VM doesn't have an IP to begin with so we cannot connect to it remotely to run this command.

Thanks

Neeraj



Viewing all articles
Browse latest Browse all 8743

Trending Articles



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