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)] [Parameter(Mandatory = $False)]
[String]$GlobalApplicationEntitlement = $null [String]$GlobalApplicationEntitlement = $null
[Parameter(Mandatory = $false)]
[switch]$clearGlobalEntitlement
) )
begin { begin {
$services = Get-ViewAPIService -HvServer $HvServer $services = Get-ViewAPIService -HvServer $HvServer
@@ -12763,6 +12766,12 @@ param (
$updates += Get-MapEntry -key 'executionData.autoUpdateOtherFileTypes' -value $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 = New-Object VMware.Hv.ApplicationService
$AppService.Application_Update($services,$App.Id,$updates) $AppService.Application_Update($services,$App.Id,$updates)
if ($?) { if ($?) {