-
Notifications
You must be signed in to change notification settings - Fork 1
/
PSRP.psm1
34 lines (27 loc) · 1000 Bytes
/
PSRP.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
<#
.SYNOPSIS
RiskPro PowerShell module
.DESCRIPTION
PowerShell library for RiskPro
.NOTES
File name: PSRP.ps1
Author: Florian Carrier
Creation date: 14/01/2019
Last modified: 15/10/2019
Dependencies: - PowerShell Tool Kit (PSTK)
- SQL Server PowerShell module (SQLServer or SQLPS)
.LINK
https://www.powershellgallery.com/packages/PSTK
.LINK
https://docs.microsoft.com/en-us/sql/powershell/download-sql-server-ps-module
#>
# 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" )
# Import files using dot sourcing
foreach ($File in @($Public + $Private)) {
try { . $File.FullName }
catch { Write-Error -Message "Failed to import function $($File.FullName): $_" }
}
# Export public functions
Export-ModuleMember -Function $Public.BaseName