Public/Utility/Initialize-KriticalUtcmPowerShellCoreSession.ps1
|
<# .SYNOPSIS Kritical.UTCM wrapper over Microsoft365DSC helper Initialize-PowerShellCoreSession (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: 0 #> function Initialize-KriticalUtcmPowerShellCoreSession { [CmdletBinding()] param() if (-not (Get-Command -Name 'Initialize-PowerShellCoreSession' -ErrorAction SilentlyContinue)) { throw '[KriticalUtcm] Initialize-PowerShellCoreSession not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'Initialize-PowerShellCoreSession' @PSBoundParameters } catch { Write-Error ('[KriticalUtcm/Initialize-KriticalUtcmPowerShellCoreSession] ' + 'Initialize-PowerShellCoreSession' + ' failed: ' + $_.Exception.Message) throw } } |