VMware Horizon Community
agalliasis_VS
Contributor
Contributor

PowerCLI Horizon 7.13.2 Publish Application update

Hello, I'm attempting to use PowerCLI to modify Horizon published apps to enable the Multisession setting (turning it from disabled to "enabled default on").  I'm receiving the following error message "Cannot find an overload for Application_Update" and the argument count: "2".

 

Sampel code: and screenshot are below.

#Get connected to view environment    $My_Domain = (Get-WmiObject -Namespace root\cimv2 -Class win32_computersystem).domain
$ViewAPIConnect = Connect-HVServer -server server-fqdn.$My_Domain
$hzServices = $Global:DefaultHVServers.ExtensionData
 
$application = New-Object VMware.Hv.ApplicationService
$appSpec = $application.getApplicationSpecHelper()
$AppPoolSpec = $appSpec.getDataObject()
 
$MultiSession = "ENABLED_DEFAULT_ON"
$MaxSessions = 10
$AppName = "APP_NAME"
 
$AppPoolSpec.Data.multiSessionMode = $MultiSession
$AppPoolSpec.Data.maxMultiSessions = $MaxSessions
$AppPoolSpec.Data.name = $AppName
$application.application_Update($hzServices, $appPoolSpec)
 
agalliasis_VS_0-1679346860072.png

 

Labels (4)
0 Kudos
0 Replies