VMware: Add PortGroup to all hosts in cluster with PowerCLI
2016-09-21 17:47
465 查看
Today we configured a new VLAN on the physical switches, now we need to
configure a portgroup with vlan id on multiple ESX hosts in our cluster. To do
this by hand it will cost 3 minutes per host, to script this.. you configure
this in 10 seconds!
The script:
Get-Cluster “clustername” | Get-VMHost | Get-VirtualSwitch -Name
“vSwitch0″ | New-VirtualPortGroup -Name “VLAN-23-Citrix Provisioning” -VLanId
23
![](http://blog.vmpros.nl/wp-content/uploads/2011/05/image.png)
configure a portgroup with vlan id on multiple ESX hosts in our cluster. To do
this by hand it will cost 3 minutes per host, to script this.. you configure
this in 10 seconds!
The script:
Get-Cluster “clustername” | Get-VMHost | Get-VirtualSwitch -Name
“vSwitch0″ | New-VirtualPortGroup -Name “VLAN-23-Citrix Provisioning” -VLanId
23
![](http://blog.vmpros.nl/wp-content/uploads/2011/05/image.png)
![](http://blog.vmpros.nl/wp-content/uploads/2011/05/image1.png)
相关文章推荐
- Add PortGroup to all hosts in cluster with PowerCLI
- Guid is not updated for cluster with specified cluster id; need to wait for hosts in this cluster to come up
- How to add extra harddriver, relocate /home in Ubuntu with VMWare player
- How to Share a Theme With All Users in a Windows 7 Computer?
- LINQ体验(7)--LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Conta...
- LINQ体验(7)——LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains
- How to identify all the Corrupted Objects in the Database reported with RMAN
- LINQ体验(7)——LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains
- LINQ体验(7)——LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains
- LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains
- Write a method to replace all spaces in a string with ‘%20’.
- LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains
- LINQ体验(7)——LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains
- LINQ体验(7)——LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains
- LINQ体验(7)——LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains
- LINQ体验(7)——LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains (转载)
- LINQ体验(7)--LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Conta...
- Add Select All Option to the Context Menu in Windows Vista
- How to Add/Drop/Resize Redo Log with Physical Standby in place. [ID 473442.1]
- 【转】【收藏】- LINQ体验(7)——LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains