vmware / PowerCLI-Example-Scripts

http://blogs.vmware.com/powercli
Other
746 stars 603 forks source link

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

Open djwork opened 2 years ago

djwork commented 2 years ago

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 commented 2 years ago

same issue on Remove-HVPool