Created
July 11, 2016 19:36
-
-
Save stephent23/be554ab53e8a214c0b68bb5cdb34c2a0 to your computer and use it in GitHub Desktop.
An example of a PowerShell Module file that loads all of the scripts / functions into memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Name of module | |
# | |
# Internal | |
# | |
[Array]$Internal = 'NameOfScript', | |
'NameOfScript ' | |
if ($Internal.Count -ge 1) { | |
$Internal | ForEach-Object { | |
. "$psscriptroot\functions-internal\$_.ps1" | |
} | |
} | |
# | |
# Public | |
# | |
[Array]$Public = 'NameOfScript', | |
'NameOfScript' | |
if ($Public.Count -ge 1) { | |
$Public | ForEach-Object { | |
. "$psscriptroot\functions\$_.ps1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment