private/Step-BuildBootLogDismGetIntl.ps1

#Requires -PSEdition Core

function Step-BuildBootLogDismGetIntl {
    <#
    .SYNOPSIS
        Logs the international configuration of the mounted WinPE image
 
    .DESCRIPTION
        Runs dism.exe with Get-Intl against global BuildMedia.MountPath and writes a
        timestamped DISM log under global BuildMedia.LogsPath. Native console output is
        not redirected and remains on the success stream.
 
    .EXAMPLE
        PS> Step-BuildBootLogDismGetIntl
 
        Displays and logs the mounted image's international configuration.
 
    .INPUTS
        None. This function does not accept pipeline input.
 
    .OUTPUTS
        System.String. Returns native stdout emitted by dism.exe.
 
    .NOTES
        Author: David Segura
        Company: Recast Software
        Version: 0.1.0
        Date: 2026-08-28
 
        Requires global BuildMedia.MountPath, global BuildMedia.LogsPath, and dism.exe.
        Reads mounted-image configuration and creates a log file.
    #>

    [CmdletBinding()]
    param ()

    $MountPath = $global:BuildMedia.MountPath
    $LogsPath = $global:BuildMedia.LogsPath

    Write-HostDateTimeDarkGray 'DISM Get-Intl Configuration'
    $CurrentLog = "$LogsPath\$((Get-Date).ToString('yyMMdd-HHmmss'))-Get-Intl.log"
    dism.exe /image:"$MountPath" /Get-Intl /LogPath:"$CurrentLog"
}