Public/Report/Get-KriticalUtcmResourceKey.ps1
|
<# .SYNOPSIS Kritical.UTCM wrapper over Microsoft365DSC helper Get-M365DSCResourceKey (category: Report, module: M365DSCReport). .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: Report Module: M365DSCReport Params: 2 #> function Get-KriticalUtcmResourceKey { [CmdletBinding()] param( [Parameter(Mandatory)] [Hashtable] $Resource, [Parameter(Mandatory)] [Hashtable] $DSCResourceInfo ) if (-not (Get-Command -Name 'Get-M365DSCResourceKey' -ErrorAction SilentlyContinue)) { throw '[KriticalUtcm] Get-M365DSCResourceKey not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'Get-M365DSCResourceKey' @PSBoundParameters } catch { Write-Error ('[KriticalUtcm/Get-KriticalUtcmResourceKey] ' + 'Get-M365DSCResourceKey' + ' failed: ' + $_.Exception.Message) throw } } |