uberAgentSupport.psm1
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition # Get public and private function definition files $Public = @( Get-ChildItem -Path $scriptPath\Public\*.ps1 -ErrorAction SilentlyContinue ) $Private = @( Get-ChildItem -Path $scriptPath\Private\*.ps1 -ErrorAction SilentlyContinue ) # Dot source the files ForEach ($import in @($Public + $Private)) { Try { . $import.fullname } Catch { Write-Error -Message "Failed to import function $($import.fullname): $_" } } # Export the Public modules Export-ModuleMember -Function $Public.Basename |