Have a follow up question.
I have mulitple vcenters and want to pull the data, however the $vpx = Get-View id 'OptionManager-VpxSettings' only seem work with 1 venter at a time.
Here is what I have
$vc1 = 192.168.0.1
$vc2 = 192.168.0.2
$vcenter = connect-viserver $vc1 $vc2
foreach ($vc in $vcenter)
{
$vpx = Get-View -Id 'OptionManager-VpxSettings'
....same stuff
}
It work if I put only 1 vcenter in at a time, but that defeats my purpose.