Contact Info

Crumbtrail

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

Export-ModuleMember - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Export-ModuleMember


Short description
Specifies the module members that are exported.

Syntax
Export-ModuleMember [[-Function] <string[]>] [-Alias <string[]>] [-Cmdlet <string[]>] [-Variable <string[]>] [<Comm
    onParameters>]

Description
The Export-ModuleMember cmdlet specifies the module members (such as cmdlets, functions, variables, and aliases) th
    at are exported from a script module (.psm1) file, or from a dynamic module created by using the New-Module cmdlet.
     This cmdlet 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
    , but the variables and aliases are not. When a script module includes an Export-ModuleMember command, only the mem
    bers specified in the Export-ModuleMember command are exported.
    
    If a script module contains multiple Export-ModuleMember commands, only the members listed in an Export-ModuleMembe
    r command are exported.
    
    You can also use Export-ModuleMember to export members that the script module imports from other modules.