Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Export-ModuleMember

Export-ModuleMember - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Export-ModuleMember

Short description
Specifies the module members that are exported.

Syntax
Export-ModuleMember [[-Function] <String[]>] [-Alias <String[]>] [-Cmdlet <String[]>] [-Variable <String[]>] [<CommonPa
rameters>]





Description
The Export-ModuleMember cmdlet specifies the module members (such as cmdlets, functions, variables, and aliases) that a
re exported from a script module (.psm1) file, or from a dynamic module created by using the New-Module cmdlet. This cm
dlet can be used only in a script module file or a dynamic module.


If a script module does not include an Export-ModuleMember command, the functions in the script module are exported, bu
t the variables and aliases are not. When a script module includes Export-ModuleMember commands, only the members speci
fied in the Export-ModuleMember commands are exported. You can also use Export-ModuleMember to suppress or export membe
rs that the script module imports from other modules.


An Export-ModuleMember command is optional, but it is a best practice. Even if the command confirms the default values,
 it demonstrates the intention of the module author.