Looks like ActiveNic is another object, do those 0 and 1 values expand further?
No
"$($VSwitch.Spec.Policy.Ni
Do you mean like this?
$($PortGroupConfig.Spec.Po
Main Topics
Browse All TopicsReferring to the accepted solution in http://www.experts-exchang
I'm not able to retrieve value from the following line
$NetworkConfig | Add-Member -Type NoteProperty -Name "PGActiveNic$i" -Value $PortGroupConfig.Spec.Poli
I added this line to the part shown in the code below
I'm sure there are values becoz i can see them in powergui, see screenshot
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I'm expecting this
vSwitch : vSwitch0
PGActiveNic.1 : vmnic2 vmnic3
StandbyNic.1 : vmnic0 vmnic1
PGActiveNic.2 : vmnic0 vmnic1
StandbyNic.2 : vmnic2 vmnic3
vSwitch : vSwitch1
PGActiveNic.1 : Inherited
StandbyNic.1 : Inherited
But i got this
vSwitch : vSwitch0
PGActiveNic1 : vmnic2 vmnic3
StandbyNic1 : Inherited
PGActiveNic2 : vmnic0 vmnic1
StandbyNic2 : Inherited
vSwitch : vSwitch1
PGActiveNic1 : Inherited
StandbyNic1 : Inherited
hmmm....not sure what happen...
$NetworkConfig | PipelineBreakpointerE4078E
ndbyNic$i" `
-Value "$($PortGroupConfig.Spec.P
If ($NetworkConfig.StandbyNic
$NetworkConfig | PipelineBreakpointerE4078E
ndbyNic$i" `
-Value "$($PortGroupConfig.Spec.P
If ($NetworkConfig.StandbyNic
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch0
vmNIC : {vmnic3, vmnic2, vmnic1, vmnic0}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic0 vmnic1 vmnic2 vmnic3
StandbyNic :
PGName1 : Service Console
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 : vmnic2 vmnic3
PGName2 : VMkernel
PGVLanId2 : 0
PGAllowPromiscuous2 : False
PGMacChanges2 : False
PGForgedTransmits2 : False
PGActiveNic2 : vmnic0 vmnic1
$NetworkConfig | PipelineBreakpointerE4078E
ndbyNic$i" `
-Value "$($PortGroupConfig.Spec.P
If ($NetworkConfig.StandbyNic
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch1
vmNIC : {vmnic5, vmnic4}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic4 vmnic5
StandbyNic :
PGName1 : Virtual Machine Network
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 :
PGName2 :
PGVLanId2 :
PGAllowPromiscuous2 :
PGMacChanges2 :
PGForgedTransmits2 :
PGActiveNic2 :
See lines marked with ------>
The string "inherited" is misplaced or missing
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch0
vmNIC : {vmnic3, vmnic2, vmnic1, vmnic0}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic0 vmnic1 vmnic2 vmnic3
------> StandbyNic : Inherited
PGName1 : Service Console
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 : vmnic2 vmnic3
StandbyNic1 : vmnic0 vmnic1
PGName2 : VMkernel
PGVLanId2 : 0
PGAllowPromiscuous2 : False
PGMacChanges2 : False
PGForgedTransmits2 : False
PGActiveNic2 : vmnic0 vmnic1
StandbyNic2 : vmnic2 vmnic3
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch1
vmNIC : {vmnic5, vmnic4}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic4 vmnic5
------> StandbyNic : Inherited
PGName1 : Virtual Machine Network
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
------> PGActiveNic1 :
------> StandbyNic1 :
PGName2 :
PGVLanId2 :
PGAllowPromiscuous2 :
PGMacChanges2 :
PGForgedTransmits2 :
PGActiveNic2 :
StandbyNic2 :
Not sure, I need to know why it's failing the Null check we created in the first place.
That is, when we got this:
But i got this
vSwitch : vSwitch0
PGActiveNic1 : vmnic2 vmnic3
StandbyNic1 : Inherited
PGActiveNic2 : vmnic0 vmnic1
StandbyNic2 : Inherited
vSwitch : vSwitch1
PGActiveNic1 : Inherited
StandbyNic1 : Inherited
I would like to test the values it's returning for StandbyNic1 and 2 to see if they're really Null at that point in the script. I have to assume they are, I can't imagine it lying to us :)
Chris
See output below
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch0
vmNIC : {vmnic3, vmnic2, vmnic1, vmnic0}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic0 vmnic1 vmnic2 vmnic3
StandbyNic :
PGName1 : Service Console
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 : vmnic2 vmnic3
StandbyNic1 : Inherited
PGName2 : VMkernel
PGVLanId2 : 0
PGAllowPromiscuous2 : False
PGMacChanges2 : False
PGForgedTransmits2 : False
PGActiveNic2 : vmnic0 vmnic1
StandbyNic2 : Inherited
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch1
vmNIC : {vmnic5, vmnic4}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic4 vmnic5
StandbyNic :
PGName1 : Virtual Machine Network
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 : Inherited
StandbyNic1 : Inherited
PGName2 :
PGVLanId2 :
PGAllowPromiscuous2 :
PGMacChanges2 :
PGForgedTransmits2 :
PGActiveNic2 :
StandbyNic2 :
StandbyNic (StandbyNic1, vSwitch0) has to be Null to end up in that state. But you think it should be showing vmnic0 and vmnic1?
It could be an oddity of how the data is presented to us (even if that's a little unlikely), very difficult to say for sure without being able to explore the objects it's using though.
Chris
Yes i think so, see output from your previous script, it works fine
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch0
vmNIC : {vmnic3, vmnic2, vmnic1, vmnic0}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic0 vmnic1 vmnic2 vmnic3
StandbyNic :
PGName1 : Service Console
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 : vmnic2 vmnic3
StandbyNic1 : vmnic0 vmnic1
PGName2 : VMkernel
PGVLanId2 : 0
PGAllowPromiscuous2 : False
PGMacChanges2 : False
PGForgedTransmits2 : False
PGActiveNic2 : vmnic0 vmnic1
StandbyNic2 : vmnic2 vmnic3
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch1
vmNIC : {vmnic5, vmnic4}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic4 vmnic5
StandbyNic :
PGName1 : Virtual Machine Network
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 :
StandbyNic1 :
PGName2 :
PGVLanId2 :
PGAllowPromiscuous2 :
PGMacChanges2 :
PGForgedTransmits2 :
PGActiveNic2 :
StandbyNic2 :
It works fine at first but then i removed the NICs from port group Service Console & vmkernel to make them "null" hoping to get "inherited" but when i run the script again...
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch0
vmNIC : {vmnic3, vmnic2, vmnic1, vmnic0}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic0 vmnic1 vmnic2 vmnic3
StandbyNic : Inherited
PGName1 : Service Console
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 :
StandbyNic1 :
PGName2 : VMkernel
PGVLanId2 : 0
PGAllowPromiscuous2 : False
PGMacChanges2 : False
PGForgedTransmits2 : False
PGActiveNic2 :
StandbyNic2 :
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch1
vmNIC : {vmnic5, vmnic4}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic4 vmnic5
StandbyNic : Inherited
PGName1 : Virtual Machine Network
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 :
StandbyNic1 :
PGName2 :
PGVLanId2 :
PGAllowPromiscuous2 :
PGMacChanges2 :
PGForgedTransmits2 :
PGActiveNic2 :
StandbyNic2 :
I also noticed "inherited" went into StandbyNic in vSwitch0
ActiveNic : vmnic0 vmnic1 vmnic2 vmnic3
StandbyNic : Inherited
Suppose to be like the previous script
ActiveNic : vmnic0 vmnic1 vmnic2 vmnic3
StandbyNic :
Sorry mate, now is a bit different, ActiveNic of each vSwitch is getting "Inherited"
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch0
vmNIC : {vmnic3, vmnic2, vmnic1, vmnic0}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : Inherited <--------------------------
StandbyNic :
PGName1 : Service Console
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 :
StandbyNic1 :
PGName2 : VMkernel
PGVLanId2 : 0
PGAllowPromiscuous2 : False
PGMacChanges2 : False
PGForgedTransmits2 : False
PGActiveNic2 :
StandbyNic2 :
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch1
vmNIC : {vmnic5, vmnic4}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : Inherited <--------------------------
StandbyNic :
PGName1 : Virtual Machine Network
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1 : vmnic4 vmnic5
StandbyNic1 :
PGName2 :
PGVLanId2 :
PGAllowPromiscuous2 :
PGMacChanges2 :
PGForgedTransmits2 :
PGActiveNic2 :
StandbyNic2 :
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch0
vmNIC : {vmnic3, vmnic2, vmnic1, vmnic0}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic0 vmnic1 vmnic2 vmnic3
StandbyNic :
PGName1 : Service Console
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1-Blank : Inherited
PGStandbyNic1-Blank : Inherited
PGActiveNic1-Null : Inherited
PGStandbyNic1-Null : Inherited
PGName2 : VMkernel
PGVLanId2 : 0
PGAllowPromiscuous2 : False
PGMacChanges2 : False
PGForgedTransmits2 : False
PGActiveNic2-Blank : Inherited
PGStandbyNic2-Blank : Inherited
PGActiveNic2-Null : Inherited
PGStandbyNic2-Null : Inherited
Datacenter : LabDC
Cluster : myCluster
vSwitch : vSwitch1
vmNIC : {vmnic5, vmnic4}
Ports : 64
Host : 192.168.88.51
AllowPromiscuous : False
MacChanges : True
ForgedTransmits : True
ActiveNic : vmnic4 vmnic5
StandbyNic :
PGName1 : Virtual Machine Network
PGVLanId1 : 0
PGAllowPromiscuous1 : False
PGMacChanges1 : False
PGForgedTransmits1 : False
PGActiveNic1-Blank : vmnic4 vmnic5
PGStandbyNic1-Blank : Inherited
PGActiveNic1-Null : vmnic4 vmnic5
PGStandbyNic1-Null : Inherited
Yes noted! Thanks!
More points for you, see my next question http://www.experts-exchang
Business Accounts
Answer for Membership
by: Chris-DentPosted on 2009-10-01 at 05:21:53ID: 25467858
Looks like ActiveNic is another object, do those 0 and 1 values expand further?
Sticking the value in quotes like this as we had before:
"$($VSwitch.Spec.Policy.Ni
Will (should) concatenate each of the ToString() values to a single string. Or was that failing as well?
Chris