RootModule.psm1
# Helper Variables $InvocationRoot = Split-Path $MyInvocation.MyCommand.Path $ChildItems = Get-ChildItem $InvocationRoot -File -Recurse # Load & Export ModuleMember Functions $ChildItems | Where-Object { $_.FullName -match 'FunctionsToExport' -and $_.BaseName -match "^Function_" -and $_.Extension -match ".ps1" } | ForEach-Object { . $_.FullName Export-ModuleMember -Function $_.BaseName.Substring(9) } |