You can use example scripts that invoke Horizon APIs and use these scripts to perform Horizon 7 administrator tasks. You can also modify these scripts to perform administrative tasks based on your requirements.

Prerequisites

Procedure

  1. Download the VMware.Hv.Helper module from the Modules section at https://github.com/vmware/PowerCLI-Example-Scripts.
  2. Use the $env:PSModulePath command to find out the modules path in your Windows PowerShell session and copy the VMware.Hv.Helper module to that location.
  3. Use the following command to load the VMware.Hv.Helper module into your Windows PowerShell session and start using the scripts.
     Get-Module -ListAvailable 'Vmware.Hv.Helper' | Import-Module; Get-Command -Module 'VMware.Hv.Helper'