PSServerCollectionTools.psm1

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
29
# No Content Yet

Set-StrictMode -Version Latest

$PublicFunctions = Get-ChildItem -Path $PSScriptRoot\PublicFunctions\*.ps1

foreach ($import in $PublicFunctions) {
    try {
        Write-Verbose "Importing $($import.FullName)"
        . $import.FullName
    } catch {
        Write-Error "Failed to import function $($import.FullName): $_"
    }
}

$PrivateFunctions = Get-ChildItem -Path $PSScriptRoot\PrivateFunctions\*.ps1

foreach ($import in $PrivateFunctions) {
    try {
        Write-Verbose "Importing $($import.FullName)"
        . $import.FullName
    } catch {
        Write-Error "Failed to import function $($import.FullName): $_"
    }
}

foreach ($file in $PublicFunctions) {
    Export-ModuleMember -Function $file.BaseName
}