-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPureStorageFlashBladePowerShell.psm1
More file actions
34 lines (29 loc) · 1.01 KB
/
Copy pathPureStorageFlashBladePowerShell.psm1
File metadata and controls
34 lines (29 loc) · 1.01 KB
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
#Requires -Version 5.1
# Module-scoped connection state
$script:PfbDefaultArray = $null
$script:PfbArrays = @{}
# Module-scoped API-capability state (Data/PfbCapabilityMap.json, Data/PfbVersionMap.json)
$script:PfbModuleRoot = $PSScriptRoot
$script:PfbCapabilityMap = $null
$script:PfbVersionMap = $null
# Dot-source all private functions
$privatePath = Join-Path $PSScriptRoot 'Private'
if (Test-Path $privatePath) {
Get-ChildItem -Path $privatePath -Filter '*.ps1' -Recurse -ErrorAction SilentlyContinue | ForEach-Object {
. $_.FullName
}
}
# Dot-source all public functions
$publicPath = Join-Path $PSScriptRoot 'Public'
$publicFunctions = @()
if (Test-Path $publicPath) {
$publicFiles = Get-ChildItem -Path $publicPath -Filter '*.ps1' -Recurse -ErrorAction SilentlyContinue
foreach ($file in $publicFiles) {
. $file.FullName
}
$publicFunctions = $publicFiles.BaseName
}
# Export only public functions
if ($publicFunctions.Count -gt 0) {
Export-ModuleMember -Function $publicFunctions
}