eaRunAs.psm1
$Commands = Get-ChildItem -Path "$PSScriptRoot\Commands" -Filter '*.ps1' Foreach($Command in $Commands){ . $Command.FullName } $PrivateCommands = Get-ChildItem -Path "$PSScriptRoot\Private Commands" -Filter '*.ps1' Foreach($Command in $PrivateCommands){ . $Command.FullName } Export-ModuleMember -Function $Commands.BaseName |