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

Re: change ip address of all vms

$
0
0

You will have to define these parameters on the function, as parameters

Function Set-WinVMIP ($VM, $IP, $SNM, $GW, $GfU, $GfP){

...

Invoke-VMScript -VM $VM -GuestUser $GfU -GuestPassword $GfP -ScriptType bat -ScriptText $netsh

}

and then you call the function for example like this (positional parameters)

Set-WinVMIP $VM $_.IP $SNM $GW $GU $GP

You can also use named parameters

Set-WinVMIP $VM $_.IP $SNM $GW -GfU $GU -GfP $GP


Viewing all articles
Browse latest Browse all 229247

Trending Articles



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