-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUcmPSTools.psm1
28 lines (22 loc) · 1.04 KB
/
UcmPSTools.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
#Thanks to Adam the Automater for these wicked pipeline tools
#Check out https://adamtheautomator.com/powershell-devops/ for more info!
#Plus Nicola Suter's guide to signing PowerShell scripts using Aure Pipelines https://tech.nicolonsky.ch/sign-powershell-az-devops/
#and COLIN DEMBOVSKY's guide to Azure Pipeline Variables https://colinsalmcorner.com/azure-pipeline-variables/
Set-StrictMode -Version Latest
# 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)) {
foreach ($import in @($Public)) {
try {
Write-Verbose "Importing $($import.FullName)"
. $import.FullName
} catch {
Write-Error "Failed to import function $($import.FullName): $_"
}
}
## Export all of the public functions making them available to the user
foreach ($file in $Public) {
Export-ModuleMember -Function $file.BaseName
}