开发者

How to get all the network names of a VM using powershell

A开发者_如何学运维m new to powershell.I have to get the names of all network a VM can connect to.So, please can anyone help me out.


If your using Hyper-V you can try to install PowerShell Management Library for Hyper-V http://pshyperv.codeplex.com/ Or you have to find a WMI you can use Get-WmiObject win32_NetworkAdapter


In PowerCLI, you can use the Get-VirtualPortGroup command:

Get-VirtualPortGroup ESXi.FQDN.local
Name                           Key                            VirtualSwitch   VLanId
----                           ---                            -------------   ------
VM Network                     key-vim.host.PortGroup-VM N... vSwitch0        0
Management Network             key-vim.host.PortGroup-Mana... vSwitch0        0
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜