VMware Cloud Community
Parhomenkov
Contributor
Contributor

скрипт виртуальных сетевых карт

скрипт показывает сетевые виртуальные сетевые карты  и мак-адреса нужно дополнить скрипт что бы показывал виланы и айпи адреса каждой виртуальной сетевой карты.

$report =@()
Get-VM | Get-View | %{
$VMname = $_.Name
$_.Config.Hardware.Device | where {$_.DeviceInfo.Label -match "Network Adapter"} | %{`
$row = "" | Select VM, MAC, Type
$row.VM = $VMname
$row.MAC = $_.MacAddress
$row.Type = $_.AddressType
$report += $row
}
}
$report

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

What is the question?
The translation seems to fail after the Russian aggression against Ukraine I'm afraid


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Parhomenkov
Contributor
Contributor

Я вас понял...

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

Google says this for me:

Virtual Network Cards Script
The script shows the network virtual network cards and poppy addresses, you need to add the script to show the Wealans and IP addresses of each virtual network card.

 

Which I think means that the user wants the script to also show VLANs and IP addresses.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos