subCommands.ps1

1
2
3
4
5
6
7
8
9
10
$subCommandsScriptPath = "$PSScriptRoot\subCommands" | Resolve-Path
$subCommandsScripts = Get-ChildItem $subCommandsScriptPath | Where-Object {
    $_.Name -like '*.ps1'
}

# Load all sub-commands
$subCommandsScripts | ForEach-Object {
    . $_.FullName
}