BCSPowershellModule.psm1
$path = "$PSScriptRoot\Module\" foreach ($directory in Get-ChildItem -Path $path -Directory | Select-Object -ExpandProperty name) { foreach ($item in Get-ChildItem -Path "$path\$directory\*.ps1" | Select-Object -ExpandProperty name) { . (Join-Path "$path\$directory\" $item) } } |