private/BootMedia/Steps/Step-BootImageDismount.ps1

#Requires -PSEdition Core

function Step-BootImageDismount {
    <#
    .SYNOPSIS
        Dismounts the Windows image and commits changes.
 
    .NOTES
        Author: David Segura
        Version: 0.1.0
    #>

    [CmdletBinding()]
    param ()

    $LogsPath = $global:BuildMedia.LogsPath

    Write-OSDeployCoreProgress 'Dismount-WindowsImage Save'
    $CurrentLog = "$LogsPath\$((Get-Date).ToString('yyMMdd-HHmmss'))-Dismount-WindowsImage.log"
    $global:BuildMedia.WindowsImage | Dismount-WindowsImage -Save -LogPath $CurrentLog | Out-Null
}