You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in the process of writing a function that will update all properties of $services.GlobalSettings.GlobalSettings_Get().GeneralData.
I know about that module VMware.Hv.Helper has Set-HVGlobalSettings cmdlet, but some new properties from Horizon 2212 aren't in it.
One of the properties is displayPreLoginMessage.
When I try to set this property via function, I see this:
Exception calling "GlobalSettings_Update" with "1" argument(s): "There is an error in the XML document."
At C:\Program Files\WindowsPowerShell\Modules\Potemkin.Hv.Helper\Potemkin.Hv.Helper.psm1:1271 char:5
+ $services.GlobalSettings.GlobalSettings_Update($updates)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException
I wrote a simple function to reproduce the error. You can find it below.
Interesting that everything is OK if I execute:
Po-temkin
changed the title
GlobalSettings.GlobalSettings_Update can't update displayPreLoginMessage via function
GlobalSettings.GlobalSettings_Update can't update displayPreLoginMessage (ant other boolen propetries) via function
Mar 20, 2023
Po-temkin
changed the title
GlobalSettings.GlobalSettings_Update can't update displayPreLoginMessage (ant other boolen propetries) via function
GlobalSettings.GlobalSettings_Update can't update displayPreLoginMessage (and other boolen propetries) via function
Mar 20, 2023
Po-temkin
changed the title
GlobalSettings.GlobalSettings_Update can't update displayPreLoginMessage (and other boolen propetries) via function
GlobalSettings.GlobalSettings_Update can't update displayPreLoginMessage (and other boolen properties) via function
Mar 20, 2023
I know about that module VMware.Hv.Helper has Set-HVGlobalSettings cmdlet, but some new properties from Horizon 2303 aren't in it.
How to set new functions, that Set-HVGlobalSettings not provided?
With -Key and -Value they are not working.
$hvServer = Connect-HVServer *hvServer*
$ViewAPI = $hvServer.ExtensionData
Set-HVGlobalSettings -Key 'GeneralData.EnableAutomaticStatusUpdates' -Value $true
same as
$update = New-Object VMware.Hv.MapEntry
$update.Key = "GeneralData.EnableAutomaticStatusUpdates"
$update.Value = $true
$ViewAPI.GlobalSettings.GlobalSettings_update($update)
same as
$service = New-Object VMware.Hv.GlobalSettingsService
$service.GlobalSettings_Update($ViewAPI, $update)
Error:
MethodInvocationException: Exception calling "GlobalSettings_Update" with "1" argument(s): "ExceptionType : VMware.Hv.InvalidArgument
ErrorMessage : Invalid member name.
ParameterName : GeneralData.EnableAutomaticStatusUpdates"
Request of value works:
(Get-HVGlobalSettings).GeneralData.EnableAutomaticStatusUpdates
False
$ViewAPI.GlobalSettings.GlobalSettings_Get().GeneralData.EnableAutomaticStatusUpdates
False
$service.GlobalSettings_Get($ViewAPI).GeneralData.EnableAutomaticStatusUpdates
False
Describe the bug
I'm in the process of writing a function that will update all properties of $services.GlobalSettings.GlobalSettings_Get().GeneralData.
I know about that module VMware.Hv.Helper has Set-HVGlobalSettings cmdlet, but some new properties from Horizon 2212 aren't in it.
One of the properties is displayPreLoginMessage.
When I try to set this property via function, I see this:
I wrote a simple function to reproduce the error. You can find it below.
Interesting that everything is OK if I execute:
This also works (if i run it directly in shell):
UPD: The same situation with DisplayWarningBeforeForcedLogoff and EnableServerInSingleUserMode
Reproduction steps
Expected behavior
DisplayPreLoginMessage updating without errors.
Additional context
Horizon Connection Server 8.8.0 build - 21073894
Powershell 5.1
PowerCLI 12.7
The text was updated successfully, but these errors were encountered: