castrac.blogg.se

Horizon desktops
Horizon desktops




To remove multiple desktops at once machine_deletemachines needs to be used with an array filled with desktop id’s and $spec. The $spec array doesn’t need to be created but it is required in the API call to remove the desktop, Powershell assumes everything true by default when it’s empty but it just has to be called otherwise you will get a big fat red error. The part that gets things done i have listed below. Instead I have used a menu structure created by Roman Gelman and that can be found inside this script on github. Since the amount of returned desktops is variable and names differ it’s not possible to use a static menu. The largest part of the script is for creating the menu’s. The latter part can be rebuild to do all those desktops at once in case something breaks pretty badly during a recompose of the pool.

horizon desktops

Since this was something i had been investigating anyway I decided to make a script for it that had separate menu’s for the status the desktop needs to be and to pick the desktop to be deleted. With faulty I mean desktops in Agent Unreachable or in error state or whatever status are available. So last week there where a couple of posts on vmtn about people wanting to automatically removing or refreshing faulty Horizon desktops. New View API query services in PowerCLI 10.1.1: pulling event information without the sql password.Horizon View Api’s: back to basics part 3: Methods.Horizon View Api’s: back to basics part 2: Queries.

horizon desktops

  • Horizon View Api’s: back to basics part 1: Connecting.





  • Horizon desktops