EC2Remote.psm1
Set-Variable -Scope 'Script' -Name 'ErrorActionPreference' -Value 'Stop' Set-Variable -Scope 'Script' -Name 'ProgressPreference' -Value 'SilentlyContinue' $functionFiles = @(Get-ChildItem -Path @("$PSScriptRoot\public", "$PSScriptRoot\private") -Include '*.ps1' -Recurse) foreach ($functionFile in $functionFiles) { try { . $functionFile.FullName } catch { Write-Error "Failed to import function $($functionFile.FullName). $_" -ErrorAction Stop } } |