DevOpsCommands.psm1
# 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 ) $Classes = @( Get-ChildItem -Path $PSScriptRoot\Classes\*.ps1 -ErrorAction SilentlyContinue ) # Dot source the files Foreach($import in @($Public + $Private + $Classes)) { Try { . $import.fullname } Catch { Write-Error -Message "Failed to import function $($import.fullname): $_" } } # Update this section as needed. # - Read in or create an initial config file and variable # - Set variables visible to the module and its functions only # This only exports the public functions and nothing else. Export-ModuleMember -Function $Public.Basename |