- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I managed to import , I google it for a bit. basically, file has three columns , first Name, second VLAN id , and 3rd number of ports.
$file = Import-Csv d:\_scripts\VBs\port.csv -Header @("Name","vlan", "NumPorts")
foreach ($vlan in $file)
{
Get-VDSwitch -Name "DSwitch" | New-VDPortgroup -Name $vlan.Name -VLanId $vlan.vlan -NumPorts $vlan.NumPorts
}