I'm looking for a script to add an additional network adapter to multiple VMs from a CSV.
I know how to import the CSV, just need the syntax to create the Network adapter port group titled Isolation.
The start of my script is:
if ((Get-PSSnapin -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $null) {
Add-PSsnapin VMware.VimAutomation.Core
}
$vcenter = Read-Host "Enter VI Server IP"
Connect-VIServer $vcenter
$VMs = import-csv C:\scripts\vms_PRODTEST.csv
foreach ($vmList in $VMs) {
$vm = Get-VM $vmList.vm
$vm | Get-NetworkAdapter.....
Thank you.