BenjaminAttal
Enthusiast
Enthusiast

content of PhysicalNicIpHint Subnet

Hello,

I am trying to obtain all Vlan seen by physical NIC on my ESX.

I tried this for one of my server and for one physical card : vmnic4

$view=get-view -moref (get-vmhost 10.179.100.100).id

$net=get-view -moref $view.configmanager.networksystem

$pnhi=$net.QueryNetworkHint("vmnic4")

After that... I see this result :

Device : vmnic4

Subnet : {151, 150, 511, 703...}

Network :

ConnectedSwitchPort :

DynamicType :

DynamicProperty :

Impossible to access to the content of Subnet field... It's frustrating !

If you have any Id how to see all Subnets I am interested

0 Kudos
2 Replies
ykalchev
VMware Employee
VMware Employee

Hi,

Did you try

$pnhi[0].subnet  

Note that QueryNetworkHint method returns array and in your case its array with 1 element that powershell outputs as result.

Regards,

Yasen

Yasen Kalchev, vSM Dev Team
BenjaminAttal
Enthusiast
Enthusiast

I dit it but as I lost my session I couldn't have the result...

Shame on me !

Thks for your help

ben

0 Kudos