forked from thetolkienblackguy/ConditionalAccessIQ
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConditionalAccessIQ.psm1
More file actions
28 lines (21 loc) · 859 Bytes
/
ConditionalAccessIQ.psm1
File metadata and controls
28 lines (21 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Set default parameters
$PSDefaultParameterValues["Get-ChildItem:File"] = $true
$PSDefaultParameterValues["Join-Path:Path"] = $PSScriptRoot
$script:template_path = Join-Path -ChildPath "Templates"
# Import all classes, private functions, and public functions
Foreach ($import in @("Classes", "Private", "Public")) {
# Get the path to the import folder
$path = Join-Path -ChildPath "$($import)\*.ps1"
# Get all the files in the import folder
$files = Get-ChildItem -Path $path -File
# Dot source all the files
Foreach ($file in $files) {
. $file.FullName
# Export public functions
If ($import -eq "Public") {
Export-ModuleMember -Function $file.BaseName
}
}
}
# Initialize the template manager class
$script:template_manager = [TemplateManager]::new($script:template_path)