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

Re: Using Powercli I having trouble modifying vm hardware and nic portgroup when deploying from template

$
0
0

That looks better, but I guess there is a typo on line 4.

That should be

Get-OSCustomizationSpec $_.Customization | Set-OSCustomizationSpec -MemoryMB $_.MemoryMB -NumCpu $_.NumCpu -Confirm:$false

And I don't think line 7 will work.

That should be something like this, and after the New-VM.

Get-VM -Name $_."Server Name" | Get-NetworkAdapter | Where {$_.NetworkName -eq 140 } |Set-NetworkAdapter -NetworkName $VLAN -Confirm:$false

Let me know if your script runs after these changes, and if it does what you want it to do ?


Viewing all articles
Browse latest Browse all 144140

Trending Articles