Functions/Startup.ps1
function Startup { [CmdletBinding()] param ( ) Set-Location "\" $GitFolder = "$($env:USERPROFILE)\git" $ImportedModules = @() # Get-ChildItem $GitFolder -Depth 1 -File *.psd1 | ForEach-Object { # $ImportedModules += Import-Module $_.FullName -Force -Global # } foreach ($d in (Get-ChildItem $GitFolder -Directory)) { $psd1file = "$($d.FullName)\$($d.Name).psd1" if (Test-Path $psd1file) { $ImportedModules += Import-Module $psd1file -Force -Global } } } |