-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPSMailKit.psm1
More file actions
21 lines (19 loc) · 805 Bytes
/
PSMailKit.psm1
File metadata and controls
21 lines (19 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Taken from http://overpoweredshell.com/Working-with-Plaster/
Export-ModuleMember -function (Get-ChildItem -Path "$PSScriptRoot\functions\*.ps1").basename
$functionFolders = @('functions', 'internal', 'classes')
ForEach ($folder in $functionFolders)
{
$folderPath = Join-Path -Path $PSScriptRoot -ChildPath $folder
If (Test-Path -Path $folderPath)
{
Write-Verbose -Message "Importing from $folder"
$functions = Get-ChildItem -Path $folderPath -Filter '*.ps1'
ForEach ($function in $functions)
{
Write-Verbose -Message " Importing $($function.BaseName)"
. $($function.FullName)
}
}
}
$publicFunctions = (Get-ChildItem -Path "$PSScriptRoot\functions" -Filter '*.ps1').BaseName
Export-ModuleMember -Function $publicFunctions