Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SetIP {
- get-OSCustomizationSpec "Windows" | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping `
- -IpMode UseStaticIP `
- -IpAddress $IP `
- -SubnetMask $NetMask `
- -DefaultGateway $Gateway `
- -Dns $DNS
- }
- ####Deployment####
- Function Deploy {
- $OSCustomizationSpec | SetIP
- New-VM -Name ($VMName + $_) `
- -Template $template `
- -ResourcePool $Pool `
- -Datastore $datastore `
- -OSCustomizationSpec $OSCustomizationSpec
- #Start-VM -VM ($VMName + $_)
- }
Add Comment
Please, Sign In to add comment