PowerCLI-Example-Scripts icon indicating copy to clipboard operation
PowerCLI-Example-Scripts copied to clipboard

VMware.HV.Helper\Get-HVPoolSpec fail unless a default HvServer connection is define, even if the -HvServer param is supplied

Open djwork opened this issue 3 years ago • 1 comments

VMware.HV.Helper\Get-HVPoolSpec fail unless a default HvServer connection is define, even if the -HvServer param is supplied.

This is due to function calls within Get-HVPoolSpec to other functions that accept a HvServer parameter to being supplied it.

1st example from VMware.HV.Helper.psm1[7854]:

  $DesktopPsObj.Base = New-Object PsObject -Property @{
    name = $DesktopInfoPsObj.Base.Name;
    displayName = $DesktopInfoPsObj.Base.displayName;
    accessGroup = (Get-HVInternalName -EntityId $entityId);
    description = $DesktopInfoPsObj.Base.description;
  }

In the example the call Get-HVInternalName needs either a default HvServer connection or the HvServer param is supplied.

djwork avatar Sep 24 '21 00:09 djwork