Private/HelperFunctions.ps1

function ValidatePath ($Path)
{
    # Validates that the path is a valid path
    return Test-Path $Path -IsValid
}

function ValidatePathExists ($Path)
{
    # Validates that the path exists
    return Test-Path $Path
}

function ValidateInstanceName ($Name)
{
    # Checks for any characters not matching a-z, A-Z, 0-9, -, and _
    # Should return false on spaces and this list of characters:
    # !"#%&/()=?@{[]}$+\^~*<>;:
    if ($Name -match "[^\-\w]")
    {
        return $false
    }

    return $true
}