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

Re: Create port groups from excel

$
0
0

Try something like this

 

$dvSw=Get-VDSwitch-Name"Boston"

Import-CsvdvPortgroups.csv-UseCulture|%{
 
New-VDPortgroup-Name$_.PgName-VlanId$_.VLanId-NumPorts$_.Ports-VDSwitch$dvSw
}

The CSV file is expected to have 3 columns

PgName,VLanId,Ports

pg1,100,32

pg2,100,32

You might want to check the number of available ports on the dvSwitch first, to check if you can add ll the requested ports for the portgroups


Viewing all articles
Browse latest Browse all 230200

Trending Articles



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