-
Notifications
You must be signed in to change notification settings - Fork 1
/
PSCredMan.psm1
25 lines (21 loc) · 981 Bytes
/
PSCredMan.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
$PSUtilsAssembly = Join-Path -Path $PSScriptRoot -ChildPath 'PsUtils_CredMan.dll'
[Void][System.Reflection.Assembly]::LoadFile($PSUtilsAssembly)
#region Module Vars
$PrivateDir = Join-Path -Path $PSScriptRoot -ChildPath Private
$PublicDir = Join-Path -Path $PSScriptRoot -ChildPath Public
$PrivateFiles = Get-ChildItem -Path $PrivateDir -Include *.ps1 -Recurse
$PublicFiles = Get-ChildItem -Path $PublicDir -Include *.ps1 -Recurse
#endregion Module Vars
#region Import Public/Private Functions
ForEach ($File in @($PrivateFiles + $PublicFiles)) {
Try {
. $File.FullName
} Catch {
Write-Warning ('Failed to load function : {0}' -F $File.BaseName)
Write-Error $PSItem.Exception.Message
}
}
#endregion Import Public/Private Functions
#region Export Public Functions
Export-ModuleMember -Function $PublicFiles.BaseName
#endregion Export Public Functions