ProvisioningTools.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
# Get public and private function definition files.
$public = @(Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue)
$private = @(Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue)

# Dot source the files
Foreach ($import in @($public + $private)) {
    Try {
        . $import.FullName
    }
    Catch {
        Write-Error "Failed to import function $($import.FullName): $_"
    }
}