Public/Intune/Write-KritTcmDriftsToEventLog.ps1
|
<# .SYNOPSIS Krit.TCM wrapper over Microsoft365DSC helper Write-M365DSCDriftsToEventLog (category: Intune, module: M365DSCDRGUtil). .DESCRIPTION Auto-scaffolded wave .1514 by New-KritTcmFromM365DscHelpers.ps1. Thin delegating passthrough — logic stays in Microsoft365DSC upstream; Krit.TCM provides the friendly namespace + citation registration for HARD RULE 20 discipline. Install-Module Microsoft365DSC -Scope CurrentUser BEFORE calling. .NOTES Wave .1514. Underlying cmdlet: Write-M365DSCDriftsToEventLog Category: Intune Module: M365DSCDRGUtil Params: 5 #> function Write-KritTcmDriftsToEventLog { [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 '[KritTcm] Write-M365DSCDriftsToEventLog not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'Write-M365DSCDriftsToEventLog' @PSBoundParameters } catch { Write-Error ('[KritTcm/Write-KritTcmDriftsToEventLog] ' + 'Write-M365DSCDriftsToEventLog' + ' failed: ' + $_.Exception.Message) throw } } |