Public/Intune/Write-KriticalUtcmDriftsToEventLog.ps1
|
<# .SYNOPSIS Kritical.UTCM wrapper over Microsoft365DSC helper Write-M365DSCDriftsToEventLog (category: Intune, module: M365DSCDRGUtil). .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: Intune Module: M365DSCDRGUtil Params: 5 #> function Write-KriticalUtcmDriftsToEventLog { [CmdletBinding()] param( [Hashtable] $Drifts, [String] $ResourceName, [String] $TenantName, [Parameter(Mandatory)] [Hashtable] $CurrentValues, [Parameter(Mandatory)] [Object] $DesiredValues ) if (-not (Get-Command -Name 'Write-M365DSCDriftsToEventLog' -ErrorAction SilentlyContinue)) { throw '[KriticalUtcm] Write-M365DSCDriftsToEventLog not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'Write-M365DSCDriftsToEventLog' @PSBoundParameters } catch { Write-Error ('[KriticalUtcm/Write-KriticalUtcmDriftsToEventLog] ' + 'Write-M365DSCDriftsToEventLog' + ' failed: ' + $_.Exception.Message) throw } } |