SharedSitecore.Backup.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Set-StrictMode -Version Latest

# Get Functions
$private = @()
#$private = @(Get-ChildItem -Path (Join-Path $PSScriptRoot Private) -Include *.ps1 -File -Recurse)
$public = @(Get-ChildItem -Path (Join-Path $PSScriptRoot Public) -Include *.ps1 -File -Recurse)

# Dot source to scope
# Private must be sourced first - usage in public functions during load
($private + $public) | ForEach-Object {
    try {
        . $_.FullName
    }
    catch {
        Write-Warning $_.Exception.Message
    }
}