Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Import-Module

Import-Module - 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.


Short description
Adds modules to the current session.

Import-Module [-Name] <string[]> [-Alias <string[]>] [-ArgumentList <Object[]>] [-AsCustomObject] [-Cmdlet <string[
]>] [-Force] [-Function <string[]>] [-Global] [-PassThru] [-Prefix <string>] [-Variable <string[]>] [-Version <Vers
ion>] [<CommonParameters>]

Import-Module [-Assembly] <Assembly[]> [-Alias <string[]>] [-ArgumentList <Object[]>] [-AsCustomObject] [-Cmdlet <s
tring[]>] [-Force] [-Function <string[]>] [-Global] [-PassThru] [-Prefix <string>] [-Variable <string[]>] [-Version
 <Version>] [<CommonParameters>]

Import-Module [-ModuleInfo] <PSModuleInfo[]> [-Alias <string[]>] [-ArgumentList <Object[]>] [-AsCustomObject] [-Cmd
let <string[]>] [-Force] [-Function <string[]>] [-Global] [-PassThru] [-Prefix <string>] [-Variable <string[]>] [-V
ersion <Version>] [<CommonParameters>]

The Import-Module cmdlet adds one or more modules to the current session. 

A module is a package that contains members (such as cmdlets, providers, scripts, functions, variables, and other t
ools and files) that can be used in Windows PowerShell. After a module is imported, you can use the module members 
in your session. 

To import a module, use the Name, Assembly, or ModuleInfo parameter to identify the module to import. By default, I
mport-Module imports all members that the module exports, but you can use the Alias, Function, Cmdlet, and Variable
 parameters to restrict the members that are imported. 

Import-Module imports a module only into the current session. To import the module into all sessions, add an Import
-Module command to your Windows PowerShell profile. For more information about profiles, see about_Profiles. 

For more information about modules, see about_Modules.