$ awk -F',' '/vDS_cluster2_yw/{ print "Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name",$1,"-NumPorts 8 -VlanId",$5 }' < dvPort-dxc.csv | sed 's#\.X#\.N#g;s#\.x#\.N#g'
Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.1.0.N -NumPorts 8 -VlanId 100 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.1.16.N -NumPorts 8 -VlanId 116 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.1.80.N -NumPorts 8 -VlanId 180 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.10.0.N -NumPorts 8 -VlanId 1000 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.10.16.N -NumPorts 8 -VlanId 1016 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.10.80.N -NumPorts 8 -VlanId 1080 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.11.0.N -NumPorts 8 -VlanId 1101 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.11.16.N -NumPorts 8 -VlanId 1116 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.11.31.N -NumPorts 8 -VlanId 1132 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.11.33.N -NumPorts 8 -VlanId 1134 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.11.4.N -NumPorts 8 -VlanId 1105 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.11.6.N -NumPorts 8 -VlanId 1107 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.11.85.Z -NumPorts 8 -VlanId 1186 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.12.21.N -NumPorts 8 -VlanId 1221 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.13.0.N -NumPorts 8 -VlanId 1300 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.13.16.N -NumPorts 8 -VlanId 1316 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.13.80.N -NumPorts 8 -VlanId 1380 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.14.0.N -NumPorts 8 -VlanId 1400 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.14.1.N -NumPorts 8 -VlanId 1401 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.14.16.N -NumPorts 8 -VlanId 1416 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.14.17.N -NumPorts 8 -VlanId 1417 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.14.2.N -NumPorts 8 -VlanId 1402 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.14.80.N -NumPorts 8 -VlanId 1480 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.14.81.N -NumPorts 8 -VlanId 1481 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.15.0.N -NumPorts 8 -VlanId 1500 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.15.16.N -NumPorts 8 -VlanId 1516 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.15.80.N -NumPorts 8 -VlanId 1580 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.16.16.N -NumPorts 8 -VlanId 1616 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.2.0.N -NumPorts 8 -VlanId 201 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.2.16.N -NumPorts 8 -VlanId 216 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.2.2.N -NumPorts 8 -VlanId 202 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.2.48.N -NumPorts 8 -VlanId 249 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.2.80.N -NumPorts 8 -VlanId 280 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.3.0.N -NumPorts 8 -VlanId 300 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.3.1.N -NumPorts 8 -VlanId 301 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.3.16.N -NumPorts 8 -VlanId 316 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.3.17.N -NumPorts 8 -VlanId 317 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.3.18.N -NumPorts 8 -VlanId 318 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.3.80.N -NumPorts 8 -VlanId 380 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.3.81.N -NumPorts 8 -VlanId 381 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.4.0.N -NumPorts 8 -VlanId 401 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.4.1.N -NumPorts 8 -VlanId 402 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.4.16.N -NumPorts 8 -VlanId 417 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.4.3.N -NumPorts 8 -VlanId 404 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.4.80.N -NumPorts 8 -VlanId 481 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.5.0.N -NumPorts 8 -VlanId 501 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.5.16.N -NumPorts 8 -VlanId 516 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.5.2.N -NumPorts 8 -VlanId 502 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.5.48.N -NumPorts 8 -VlanId 549 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.5.49.N -NumPorts 8 -VlanId 550 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.5.80.N -NumPorts 8 -VlanId 580 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.6.0.N -NumPorts 8 -VlanId 600 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.6.16.N -NumPorts 8 -VlanId 616 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.6.80.N -NumPorts 8 -VlanId 680 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.7.0.N -NumPorts 8 -VlanId 700 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.7.16.N -NumPorts 8 -VlanId 716 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.7.80.N -NumPorts 8 -VlanId 780 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.8.0.N -NumPorts 8 -VlanId 800 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.8.16.N -NumPorts 8 -VlanId 816 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.8.80.N -NumPorts 8 -VlanId 880 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.9.0.N -NumPorts 8 -VlanId 900 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.9.16.N -NumPorts 8 -VlanId 916 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name 100.9.80.N -NumPorts 8 -VlanId 980 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name esxi_mgmt_1201 -NumPorts 8 -VlanId 1201 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name MGT1212-100.12.12.N -NumPorts 8 -VlanId 1212 Get-VDSwitch -Name vDS-cluster03-YW | New-VDPortgroup -Name vlan1198 -NumPorts 8 -VlanId 1199
$ awk -F',' '/Cluster-VM-vDS/{ print "Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name",$1,"-NumPorts 8 -VlanId",$5 }' < dvPort-dxc.csv | sed 's#\.Y#\.N#g;s#\.X#\.N#g;s#\.x#\.N#g'
Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.1.0.N -NumPorts 8 -VlanId 100 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.1.16.N -NumPorts 8 -VlanId 116 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.1.80.N -NumPorts 8 -VlanId 180 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.10.0.N -NumPorts 8 -VlanId 1000 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.10.16.N -NumPorts 8 -VlanId 1016 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.10.80.N -NumPorts 8 -VlanId 1080 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.11.16.N -NumPorts 8 -VlanId 1116 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.11.2.N -NumPorts 8 -VlanId 1103 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.11.33.N -NumPorts 8 -VlanId 1134 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.11.6.N -NumPorts 8 -VlanId 1107 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.13.0.N -NumPorts 8 -VlanId 1300 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.13.16.N -NumPorts 8 -VlanId 1316 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.13.80.N -NumPorts 8 -VlanId 1380 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.14.1.N -NumPorts 8 -VlanId 1401 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.14.16.N -NumPorts 8 -VlanId 1416 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.14.17.N -NumPorts 8 -VlanId 1417 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.14.81.N -NumPorts 8 -VlanId 1481 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.15.0.N -NumPorts 8 -VlanId 1500 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.15.16.N -NumPorts 8 -VlanId 1516 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.15.80.N -NumPorts 8 -VlanId 1580 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.16.16.N -NumPorts 8 -VlanId 1616 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.2.16.N -NumPorts 8 -VlanId 216 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.2.2.N -NumPorts 8 -VlanId 202 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.2.80.N -NumPorts 8 -VlanId 280 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.3.0.N -NumPorts 8 -VlanId 300 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.3.18.N -NumPorts 8 -VlanId 318 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.3.81.N -NumPorts 8 -VlanId 381 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.4.0.N -NumPorts 8 -VlanId 401 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.4.16.N -NumPorts 8 -VlanId 417 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.4.3.N -NumPorts 8 -VlanId 404 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.4.80.N -NumPorts 8 -VlanId 481 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.5.16.N -NumPorts 8 -VlanId 516 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.5.2.N -NumPorts 8 -VlanId 502 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.5.80.N -NumPorts 8 -VlanId 580 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.6.0.N -NumPorts 8 -VlanId 600 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.6.16.N -NumPorts 8 -VlanId 616 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.6.80.N -NumPorts 8 -VlanId 680 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.7.0.N -NumPorts 8 -VlanId 700 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.7.16.N -NumPorts 8 -VlanId 716 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.7.80.N -NumPorts 8 -VlanId 780 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.8.0.N -NumPorts 8 -VlanId 800 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.8.16.N -NumPorts 8 -VlanId 816 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.8.80.N -NumPorts 8 -VlanId 880 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.9.0.N -NumPorts 8 -VlanId 900 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.9.16.N -NumPorts 8 -VlanId 916 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name 100.9.80.N -NumPorts 8 -VlanId 980 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name DB1101-100.11.0.N -NumPorts 8 -VlanId 1101 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name GZDB_DB501_100.5.0.N -NumPorts 8 -VlanId 501 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name GZDB_DMZ549_100.5.48.N -NumPorts 8 -VlanId 549 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name GZZQ601_100.6.0.N -NumPorts 8 -VlanId 601 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name GZZQ602_100.6.1.N -NumPorts 8 -VlanId 602 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name INTERNET_100.32.0.N -NumPorts 8 -VlanId 3201 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKGGPrivate1131_100.11.30.N -NumPorts 8 -VlanId 1131 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKGG-Trust1106-100.11.5.N -NumPorts 8 -VlanId 1106 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKGG-Trust1107-100.11.6.0 -NumPorts 8 -VlanId 1107 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKXEDK_DB201_100.2.0.N -NumPorts 8 -VlanId 201 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKXEDK_DMZ249_100.2.48.N -NumPorts 8 -VlanId 249 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKZB401_100.4.0.N -NumPorts 8 -VlanId 401 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKZB401-MailClient-100.4.0.N -NumPorts 8 -VlanId 401 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKZB402_100.4.1.N -NumPorts 8 -VlanId 402 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKZBPrivate448_100.4.47.N -NumPorts 8 -VlanId 448 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKZYDB_DMZ1049_100.10.48.N -NumPorts 8 -VlanId 1049 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKZYDB_TRUST1001_100.10.0.N -NumPorts 8 -VlanId 1001 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name JKZYDB_TRUST1002_100.10.1.N -NumPorts 8 -VlanId 1002 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name MGT1212_100.12.12.N -NumPorts 8 -VlanId 1212 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name Private-vlan4000 -NumPorts 8 -VlanId 4000 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name Pub1105-100.11.4.N -NumPorts 8 -VlanId 1105 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name PubDMZ1132-100.11.31.N -NumPorts 8 -VlanId 1132 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name PubFK1102-100.11.1.N -NumPorts 8 -VlanId 1102 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name RZZL301_100.3.0.N -NumPorts 8 -VlanId 301 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name RZZL302_100.3.1.N -NumPorts 8 -VlanId 301 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name vlan317 -NumPorts 8 -VlanId 317 Get-VDSwitch -Name Cluster-VM-vDS | New-VDPortgroup -Name VM-vDS-DVUplinks-39 -NumPorts 8 -VlanId
