Files
PowerCLI-Example-Scripts/Modules/VMware.Hv.Helper
mtelvers 1edf24432c Improved searching for Host and Clusters, Resource Pools and Access Groups
Add three new internal functions Get-HVHostOrClusterID, Get-HVResourcePoolID and Get-HVAccessGroupID to search the tree results of HostOrCluster_GetHostOrClusterTree(), ResourcePool_GetResourcePoolTree() and AccessGroup_List() respectively.  Previously only the top level of the result tree from these calls where considered which was raised as issue #88.  The solutions provided in the discussions were point fixes as they changed the level of the tree which was searched which missed matches at the other and the original levels.
2017-10-18 08:54:42 +01:00
..
2017-04-21 21:17:27 +05:30

Prerequisites/Steps to use this module:

  1. This module only works for Horizon product E.g. Horizon 7.0.2 and later.
  2. Install the latest version of Powershell, PowerCLI(6.5) or (later version via psgallery).
  3. Import HorizonView module by running: Import-Module VMware.VimAutomation.HorizonView.
  4. Import "VMware.Hv.Helper" module by running: Import-Module -Name "location of this module" or Get-Module -ListAvailable 'VMware.Hv.Helper' | Import-Module.
  5. Get-Command -Module "This module Name" to list all available functions or Get-Command -Module 'VMware.Hv.Helper'.

Example script to connect view API service of Connection Server:

Import-Module VMware.VimAutomation.HorizonView

Connection to view API service

$hvServer = Connect-HVServer -server <connection server IP/FQDN> $hvServices = $hvserver.ExtensionData $csList = $hvServices.ConnectionServer.ConnectionServer_List()

Load this module

Get-Module -ListAvailable 'VMware.Hv.Helper' | Import-Module Get-Command -Module 'VMware.Hv.Helper'

Use advanced functions of this module

New-HVPool -spec 'path to InstantClone.json file'