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