Public/TenantInfo/Get-KriticalUtcmM365TenantName.ps1
|
<# .SYNOPSIS Kritical.UTCM wrapper over Microsoft365DSC helper Get-M365TenantName (category: TenantInfo, module: M365DSCTenantInfo). .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: TenantInfo Module: M365DSCTenantInfo Params: 2 #> function Get-KriticalUtcmM365TenantName { [CmdletBinding()] param( [SwitchParameter] $UseMFA, [PSCredential] $Credential ) if (-not (Get-Command -Name 'Get-M365TenantName' -ErrorAction SilentlyContinue)) { throw '[KriticalUtcm] Get-M365TenantName not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'Get-M365TenantName' @PSBoundParameters } catch { Write-Error ('[KriticalUtcm/Get-KriticalUtcmM365TenantName] ' + 'Get-M365TenantName' + ' failed: ' + $_.Exception.Message) throw } } |