Search This Blog

Tuesday, November 1, 2011

One liner to get VMNIC and PCI adapter positions

  Here's a oneliner I recently used to get vmnic and PCI adapter positions. The PCI slot numbers were needed for automated deployment of ESXi hosts and the h

Get-vmhost $VMhost | % {$x=$_; $x| get-view | % { get-view $_.ConfigManager.NetworkSystem  }  |  % { $_.NetworkInfo  } | % { $_.Pnic  } | Select @{N="VMhost"; E={$x} } , device, pci, mac  } 

Stay tuned for the really fast version. 

No comments:

Post a Comment