VMware Cloud Community
ISYS2
Enthusiast
Enthusiast

Network MOR issue?

Can somebody try the following against a Virtual Center and see if they get the same issue as me

connect-viserver 'w.x.y.z' -username username -password password

$dc - Get-Datacenter | Get-View

foreach($dstore in $dc.Datastore){

Write-Host (Get-VIObjectByVIView $dstore)

}

foreach($net in $dc.Network){

Write-Host (Get-VIObjectByVIView $net)

}

The first part works and lists all the datastores in the VirtualCenter. The second outputs as many blank lines as I have networks in the VirtualCenter. It seems that the Managed Object Reference for the Networks in $dc isn't right for some reason.

Thanks

0 Kudos
1 Reply
LucD
Leadership
Leadership

I get the same result. Looks indeed like a bug in the Get-VIObjectByVIView cmdlet. Smiley Sad


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

0 Kudos