创建虚拟交换机(New-VMSwitch)

 

#获取网卡列表
Get-NetAdapter


#新建外部虚拟交换机(两种方法均可)
New-VMSwitch -Name VSCSI -InterfaceDescription "Intel(R) PRO/1000 MT Network Connection #4" -AllowManagementOS $false -EnableIov $false -Notes "PS VSCSI"

New-VMSwitch -Name VSCSI -NetAdapterName "iSCSI" -allowManagementOS $false -EnableIov $false -Notes "PS VSCSI"

#删除虚拟交换机
remove-vmswitch -name vscsi -force

 

通过WMI获取网卡列表:

gwmi win32_networkadapter |select name

posted on 2013-12-13 16:47  momingliu11  阅读(2627)  评论(0编辑  收藏  举报