ZeroTrustAssessment.psm1

#Requires -Version 7.0
#Requires -PSEdition Core,Desktop
#Requires -Assembly
#Requires -Assembly
#Requires -Assembly
#Requires -Module @{'ModuleName'='Microsoft.Graph.Authentication';'GUID'='883916f2-9184-46ee-b1f8-b6a2fb784cee';'ModuleVersion'='2.2.0'}

<#
.SYNOPSIS
    ZeroTrustAssessment
.DESCRIPTION
    Perform a Zero Trust Assessment of your Microsoft 365 environment.
.NOTES
    ModuleVersion: 1.0.3-preview
    GUID: 708723ef-2420-4bcb-bfd7-988e190d7acf
    Author: Microsoft
    CompanyName: Microsoft
    Copyright: (c) Microsoft. All rights reserved.
.FUNCTIONALITY
    Connect-ZtAssessment, Get-ZtGraphScope, Invoke-ZtAssessment
.LINK
    https://github.com/microsoft/zerotrustassessment
#>


#region NestedModules Script(s)

#endregion

Add-Type -Path "$PSScriptRoot\lib\DuckDB.NET.Data.dll"

## Initialize Module Variables
## Update Clear-ModuleVariable function in private/Clear-ModuleVariable.ps1 if you add new variables here
$__ZtSession = @{
    GraphCache = @{}
    GraphBaseUri = $null
}
New-Variable -Name __ZtSession -Value $__ZtSession -Scope Script -Force


# Import private and public scripts and expose the public ones
$privateScripts = @(Get-ChildItem -Path "$PSScriptRoot\private" -Recurse -Filter "*.ps1")
$publicScripts = @(Get-ChildItem -Path "$PSScriptRoot\public" -Recurse -Filter "*.ps1")

foreach ($script in ($privateScripts + $publicScripts)) {
    try {
        . $script.FullName
    } catch {
        Write-Error -Message ("Failed to import function {0}: {1}" -f $script, $_)
    }
}

Export-ModuleMember -Function @('Connect-ZtAssessment','Get-ZtGraphScope','Invoke-ZtAssessment') -Cmdlet @() -Variable @() -Alias @('Invoke-ZeroTrustAssessment')