forked from LeeHolmes/PowerShellCookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSelectiveCommands.psm1
30 lines (26 loc) · 911 Bytes
/
SelectiveCommands.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
##############################################################################
##
## SelectiveCommands.psm1
## Demonstrates the selective export of module commands
##
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)
##
##############################################################################
## An internal helper function
function MyInternalHelperFunction
{
"Result from my internal helper function"
}
## A command exported from the module
function Get-SelectiveCommandInfo
{
"Getting information from the SelectiveCommands module"
MyInternalHelperFunction
}
## Alternate names for our standard command
Set-Alias gsci Get-SelectiveCommandInfo
Set-Alias DomainSpecificVerb-Info Get-SelectiveCommandInfo
## Export specific commands
Export-ModuleMember -Function Get-SelectiveCommandInfo
Export-ModuleMember -Alias gsci,DomainSpecificVerb-Info