private/BootMedia/Steps/Step-BootImageGetStartnet.ps1

#Requires -PSEdition Core

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

    [CmdletBinding()]
    param ()

    $MountPath = $global:BuildMedia.MountPath
    $startnetPath = "$MountPath\Windows\System32\startnet.cmd"

    if (Test-Path $startnetPath) {
        Write-OSDeployCoreProgress 'Startnet.cmd Content'
        [System.String]$ContentStartnet = Get-Content -Path $startnetPath -Raw
        $global:BuildMedia.ContentStartnet = $ContentStartnet
        $ContentStartnet | Out-Host
    }
}