rename VMHost Parameter
This commit is contained in:
@@ -62,12 +62,12 @@ param(
|
|||||||
Begin {
|
Begin {
|
||||||
|
|
||||||
|
|
||||||
function Get-Info ($VMhost){
|
function Get-Info ($VMhostToProcess){
|
||||||
$VMhostProxySwitch = $VMhost.NetworkInfo.ExtensionData.ProxySwitch
|
$VMhostProxySwitch = $VMhostToProcess.NetworkInfo.ExtensionData.ProxySwitch
|
||||||
$VMhostSwitch = $VMhost.NetworkInfo.VirtualSwitch
|
$VMhostSwitch = $VMhostToProcess.NetworkInfo.VirtualSwitch
|
||||||
|
|
||||||
$objReport = @()
|
$objReport = @()
|
||||||
$VMhost| %{Get-View $_.ID} |
|
$VMhostToProcess| %{Get-View $_.ID} |
|
||||||
%{ Get-View $_.ConfigManager.NetworkSystem} |
|
%{ Get-View $_.ConfigManager.NetworkSystem} |
|
||||||
%{ foreach($physnic in $_.NetworkInfo.Pnic){
|
%{ foreach($physnic in $_.NetworkInfo.Pnic){
|
||||||
|
|
||||||
@@ -83,8 +83,8 @@ Begin {
|
|||||||
|
|
||||||
$pnicInfo = $_.QueryNetworkHint($physnic.Device)
|
$pnicInfo = $_.QueryNetworkHint($physnic.Device)
|
||||||
foreach($hint in $pnicInfo){
|
foreach($hint in $pnicInfo){
|
||||||
$obj.ClusterName = $VMhost.parent.name
|
$obj.ClusterName = $VMhostToProcess.parent.name
|
||||||
$obj.HostName = $VMhost.name
|
$obj.HostName = $VMhostToProcess.name
|
||||||
$obj.vmnic = $physnic.Device
|
$obj.vmnic = $physnic.Device
|
||||||
$obj.PCI = $physnic.PCI
|
$obj.PCI = $physnic.PCI
|
||||||
$obj.MAC = $physnic.Mac
|
$obj.MAC = $physnic.Mac
|
||||||
@@ -135,7 +135,7 @@ Process {
|
|||||||
|
|
||||||
$MyView = @()
|
$MyView = @()
|
||||||
|
|
||||||
foreach ($myHost in $myHosts) {
|
foreach ($myHost in $VMhost) {
|
||||||
|
|
||||||
$Info = Get-Info $myHost
|
$Info = Get-Info $myHost
|
||||||
$MyView += $Info
|
$MyView += $Info
|
||||||
|
|||||||
Reference in New Issue
Block a user