public/Get-RecipeImageFolder.ps1

function Get-RecipeImageFolder {
    [CmdletBinding()]
    param(
        [Parameter()]
        $ImageRoot = $script:RecipeImageRoot
    )


    if (-not (Test-Path $ImageRoot)) {
       $null = New-Item -Path $ImageRoot -ItemType Directory -Force
    }

    $ImageRoot
}