AutomatedLabNotifications.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
30
31
32
33
34
#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 -Message "Failed to import function $($import.FullName): $_"
    }
}

Export-ModuleMember -Function $public.Basename

<#
IDEE

NotificationHub lädt alle Provider. Jeder Provider nimmt Funktion Subscribe-<Prod>NotificationProvider und Unsubscribe-<Prod>NotificationProvider.
Jeder Provider hat Parameter Activity, Message, und LabName wird automatisch
Provider-Einstellungen in PSD1-Files (?)

NOtificationHub liefert Subscribe-ALNotifications -Provider Provider[], Unsubscribe -Provider, -All; Send-ALNotification

Install-Lab greift auf NotificationsHub zu -> Send-ALNotification -Activity -Status -Message


Subscriptions

#>