Public/Logging/Export-KritTcmDiagnosticData.ps1
|
<# .SYNOPSIS Krit.TCM wrapper over Microsoft365DSC helper Export-M365DSCDiagnosticData (category: Logging, module: M365DSCLogEngine). .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: Export-M365DSCDiagnosticData Category: Logging Module: M365DSCLogEngine Params: 6 #> function Export-KritTcmDiagnosticData { [CmdletBinding()] param( [Parameter(Mandatory)] [String] $ExportFilePath, [UInt32] $NumberOfDays, [SwitchParameter] $Anonymize, [Parameter(Mandatory)] [String] $Server, [Parameter(Mandatory)] [String] $Domain, [Parameter(Mandatory)] [String] $Url ) if (-not (Get-Command -Name 'Export-M365DSCDiagnosticData' -ErrorAction SilentlyContinue)) { throw '[KritTcm] Export-M365DSCDiagnosticData not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'Export-M365DSCDiagnosticData' @PSBoundParameters } catch { Write-Error ('[KritTcm/Export-KritTcmDiagnosticData] ' + 'Export-M365DSCDiagnosticData' + ' failed: ' + $_.Exception.Message) throw } } |