The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to Import Cmdlets Using Modules


This topic describes how to import cmdlets to a Windows PowerShell session by using a binary module.


The members of modules can include cmdlets, providers, functions, variables, aliases, and much more. Snap-ins can contain only cmdlets and providers.

How to load cmdlets using a module

  1. Create a module folder that has the same name as the assembly file in which the cmdlets are implemented. In this procedure, the module folder is created in the system32 folder.


  2. Make sure that the PSModulePath environment variable includes the path to your new module folder. By default, the system folder is already added to the PSModulePath environment variable.

  3. Copy the cmdlet assembly into the module folder.

  4. Run the following command to add the cmdlets to the session:

    import-module [Module_Name]

This procedure can be used to test your cmdlets. It adds all the cmdlets in the assembly to the session. For more information about modules, the different types of modules, the different ways to load modules, and how to restrict the elements of a module that are exported, see Writing a Windows PowerShell Module.