Files
PowerCLI-Example-Scripts/Modules/VMware.Hv.Helper
Brian Wuchner 5b291a5ac0 Update VMware.HV.Helper.psm1
Fixes #364 - Get-HVEvent timeout issue
Changes to line 877-879 adds help for a new SqlTimeout parameter added to Get-HVEvent
Changes to line 931-934 add support for the new SqlTimeout parameter with a default value of 30 seconds.
Changes to line 1064 implements the timeout parameter created above when executing the query.

The change to line 1031 resolves an unrelated issue where I was seeing an extra '1' in the output from Get-HVEvent.  Adding the `Out-Null` statement is similar to another example in this same function which already existed on line 1065.  Adding the `Out-Null` statement did resolve the extra '1' displayed in the output.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2022-01-13 07:59:41 -05:00
..
2020-02-06 13:49:04 -06:00
2019-08-27 12:14:00 +02:00
2020-02-06 13:49:04 -06:00

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 ViewAPI service

Import-Module VMware.VimAutomation.HorizonView

# Connection to view API service
$hvServer = Connect-HVServer -server <connection server IP/FQDN>
$hvServices = $hvserver.ExtensionData

# List Connection Servers
$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'