Scripts/GlobalConstants.ps1

<#
.SYNOPSIS
    This script sets several global constant variables.
#>


# Set the variables
@(
    @{
        Name    = "LINE_FEED"
        Option  = "Constant"
        Value   = "`n"
        Scope   = "Global"
    },
    @{
        Name    = "CLEAR_VALUE_FLAG"
        Option  = "Constant"
        Value   = "-ClearValue"
        Scope   = "Global"
    }
) | ForEach-Object {
    # Only set the variable if it currently does not exist
    if (!(Get-Variable -Name $_.Name -Scope $_.Scope -ErrorAction SilentlyContinue)) {
        Write-Verbose "Setting $($_.Scope) $($_.Option) variable '$($_.Name)'."
        Set-Variable -Name $_.Name -Option $_.Option -Value $_.Value -Scope $_.Scope
    }
}