ad-rbac.psm1

. "$PSScriptRoot\settings.ps1"
$defaults
$settings = $defaults
# Get public and private function definition files
    $public = @( Get-ChildItem -path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue | sort-object fullName)
    $private = @( Get-ChildItem -path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue | sort-object fullName)
    $variables = @( Get-ChildItem -path $PSScriptRoot\vars\*.ps1 -ErrorAction SilentlyContinue | sort-object fullName)
    Import-Module "$PSScriptRoot\modules\GPRegistryPolicy\GPRegistryPolicy.psm1" -DisableNameChecking
    Import-Module "$PSScriptRoot\modules\GPRegistryPolicy\GPRegistryPolicyParser.psm1" -DisableNameChecking


#Dot Source the files
    foreach ($import in @($Private + $Public))
    {
        Try
        {
            . $import.fullname
        }
        Catch
        {
            write-error -Message "Failed to import function $($import.fullname): $_"
        }
    }
    $ObjectGUIDs = get-ADObjectGUIDs
    foreach ($import in @($variables))
    {
        Try
        {
            . $import.fullname
        }
        Catch
        {
            write-error -Message "Failed to import function $($import.fullname): $_"
            write-error $_.scriptstacktrace
        }
    }

if ($PSVersionTable.psversion.major -ge 7) {
    $CompatMode = $False
} else {
    $CompatMode = $true
}



# Stuff to do
    # Read in or create an initial config file and variable
    # Export functions that are WIP
    # set variables visible to module
#$ConfirmPreference = "High"

Export-moduleMember -function $public.basename