Remove VirtualPortGroup Specify vSwitch
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Remove VirtualPortGroup Specify vSwitch相关的知识,希望对你有一定的参考价值。
Script
-----------------------------------------------------------------------------------------
#Remove all port groups on speific vSwitch#
Add-PSSnapin vmWARE.VimAutomation.Core
Connect-VIServer VCName
$hostserver = "10.194.194.80"
$virtualsw = Get-virtualswitch -vmhost $hostserver -Name vSwitch0
#$vswgoup = Get-VirtualPortGroup -VMHost 10.194.96.1 -VirtualSwitch $virtualsw | where { $_.Name -ne "Management Network" }
$vswgoup = Get-VirtualPortGroup -VirtualSwitch $virtualsw | where { $_.Name -ne "Management Network" }
$vswgoup | Remove-VirtualPortGroup -confirm:$false
Disconnect-VIServer VCName
以上是关于Remove VirtualPortGroup Specify vSwitch的主要内容,如果未能解决你的问题,请参考以下文章
LeetCode 1021:Remove Outermost Parentheses
Eclipse's Import error and remove
oracle sql - remove a user's all objects