PowerCLI-Example-Scripts
PowerCLI-Example-Scripts copied to clipboard
GlobalSettings.GlobalSettings_Update metod error
Describe the bug
If i set only propetry "reauthSecureTunnelAfterInterruption"
Exception on call "GlobalSettings_Update" with "1" arguments: "There is an error in the XML document."
string:3 character:1
+ $ViewAPI.GlobalSettings.GlobalSettings_Update($MapEntry)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException
If i trying to set others
Exception on call "GlobalSettings_Update" with "1" arguments: "ExceptionType : VMware.Hv.InvalidArgument
ErrorMessage : Cannot update member with read-only fields.
ParameterName : securityData"
string:3 character:1
+ $ViewAPI.GlobalSettings.GlobalSettings_Update($MapEntry)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
Reproduction steps
$ViewServer = Connect-HVServer -server $fqdn -user $user -password $pass -domain $domain
$ViewAPI = $ViewServer.ExtensionData
$GlobalSettingsSecurityData = New-Object VMware.Hv.GlobalSettingsSecurityData -Property @{reauthSecureTunnelAfterInterruption=$false}
$MapEntry = New-Object VMware.Hv.MapEntry -Property @{Key='securityData';Value=$GlobalSettingsSecurityData}
$ViewAPI.GlobalSettings.GlobalSettings_Update($MapEntry)
Expected behavior
Metod succesfully update Global Security settings.
Additional context
Horizon Connection Server 8.6.0 build - 20099816