PSAspireAPI.psm1
|
# PSApireAPI.psm1 # PowerShell module for dot-sourcing all function files in the module tree # Get the module root directory $moduleRoot = $PSScriptRoot # Dot-source all .ps1 files in Public and Private directories $publicPath = Join-Path -Path $moduleRoot -ChildPath 'Public' $privatePath = Join-Path -Path $moduleRoot -ChildPath 'Private' # Dot-source public functions (including subdirectories like Authorization) if (Test-Path -Path $publicPath) { Get-ChildItem -Path $publicPath -Recurse -Include *.ps1 | ForEach-Object { . $_.FullName } } # Dot-source private functions if (Test-Path -Path $privatePath) { Get-ChildItem -Path $privatePath -Recurse -Include *.ps1 | ForEach-Object { . $_.FullName } } |