Merge pull request #355 from bfett20/master

Add -clearGlobalEntitlement to Set-HVApplication
This commit is contained in:
Kyle Ruddy
2020-03-05 14:09:19 -05:00
committed by GitHub

View File

@@ -12683,6 +12683,9 @@ param (
[Parameter(Mandatory = $False)]
[String]$GlobalApplicationEntitlement = $null
[Parameter(Mandatory = $false)]
[switch]$clearGlobalEntitlement
)
begin {
$services = Get-ViewAPIService -HvServer $HvServer
@@ -12762,6 +12765,12 @@ param (
if ($PSBoundParameters.ContainsKey("AutoUpdateOtherFileTypes")) {
$updates += Get-MapEntry -key 'executionData.autoUpdateOtherFileTypes' -value $AutoUpdateOtherFileTypes
}
if ($clearGlobalEntitlement) {
$update = New-Object VMware.Hv.MapEntry
$update.key = 'data.globalApplicationEntitlement'
$updates += $update
}
$AppService = New-Object VMware.Hv.ApplicationService
$AppService.Application_Update($services,$App.Id,$updates)