private/BootMedia/Steps/Step-BootImageGetWinpeshl.ps1

#Requires -PSEdition Core

function Step-BootImageGetWinpeshl {
    <#
    .SYNOPSIS
        Reads and stores the winpeshl.ini content from the mounted WinPE image.
 
    .NOTES
        Author: David Segura
        Version: 0.1.0
    #>

    [CmdletBinding()]
    param ()

    $MountPath = $global:BuildMedia.MountPath
    $winpeshlPath = "$MountPath\Windows\System32\winpeshl.ini"

    if (Test-Path $winpeshlPath) {
        Write-OSDeployCoreProgress 'winpeshl.ini Content'
        [System.String]$ContentWinpeshl = Get-Content -Path $winpeshlPath -Raw
        $global:BuildMedia.ContentWinpeshl = $ContentWinpeshl
        $ContentWinpeshl | Out-Host
    }
}