Public/Graph/Set-KriticalUtcmMgGroupLicense.ps1
|
<# .SYNOPSIS Kritical.UTCM wrapper over Microsoft365DSC helper Set-MgGroupLicense (category: Graph, module: M365DSCGraphShim). .DESCRIPTION Thin delegating passthrough — logic stays in Microsoft365DSC upstream; Kritical.UTCM provides the friendly namespace + citation registration. Install-Module Microsoft365DSC -Scope CurrentUser BEFORE calling. .NOTES Category: Graph Module: M365DSCGraphShim Params: 14 #> function Set-KriticalUtcmMgGroupLicense { [CmdletBinding()] param( [String] $GroupId, [Object] $InputObject, [Object] $BodyParameter, [String] $ResponseHeadersVariable, [Object] $AddLicenses, [Hashtable] $AdditionalProperties, [String[]] $RemoveLicenses, [SwitchParameter] $Break, [IDictionary] $Headers, [Object[]] $HttpPipelineAppend, [Object[]] $HttpPipelinePrepend, [Uri] $Proxy, [PSCredential] $ProxyCredential, [SwitchParameter] $ProxyUseDefaultCredentials ) if (-not (Get-Command -Name 'Set-MgGroupLicense' -ErrorAction SilentlyContinue)) { throw '[KriticalUtcm] Set-MgGroupLicense not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'Set-MgGroupLicense' @PSBoundParameters } catch { Write-Error ('[KriticalUtcm/Set-KriticalUtcmMgGroupLicense] ' + 'Set-MgGroupLicense' + ' failed: ' + $_.Exception.Message) throw } } |