FlexdeskBlueprint.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
#Requires -Version 3
#Requires -Module AzureRM.Profile
#Requires -Module AzureRM.Resources
#Requires -Module MSOnline
#Requires -Module Microsoft.Online.SharePoint.PowerShell
#Requires -Module AzureRM.Network
[cmdletbinding()]
param(

)
Set-StrictMode -Version Latest
$script:ErrorActionPreference = "stop"
New-Variable -Name Root -Scope Script -Value $PSScriptRoot -Force

Get-ChildItem -Path "$script:Root\Functions\" -Include '*.ps1' -Recurse |
ForEach-Object {
    write-verbose "Registering function $($_.BaseName)"
    . $_.FullName;
    if($_.Directory.Name -eq 'public'){
        Write-Verbose "Exporting public function $($_.BaseName)"
        Export-ModuleMember -Function $_.BaseName
    }
}

Register-Classes
Set-ModuleVariable