PowerTip: Easily Load all Windows PowerShell Modules

Summary: See how to load all Windows PowerShell modules into a current session.

Hey, Scripting Guy! Question How can I load all Windows PowerShell modules I have on my system?

          Hey, Scripting Guy! Answer Use the Get-Module cmdlet with the ListAvailable switch, and pipe the results to the Import-Module cmdlet.

                           Get-Module -ListAvailable | Import-Module

Comments (6)

  1. Anonymous says:

    Darius, that command needs to be run from your profile. If you’re using the ISE, it should be named Microsoft.PowerShellISE_profile.ps1

    Ed has multiple blog posts on profiles. To look up your profile, just type the reserved variable name $profile at the shell prompt.

  2. dexter says:

    My list is empty, how do I fix this?

  3. MC says:

    Be aware that if you have other users of powershell, this would not load modules located in their user profile.

  4. DARIUS says:

    This is great but how do I make sure that they stay there for another PowerShell session ?

  5. Shakiel says:

    Awesome Works perfect everytime

  6. Riderman says:

    How to load modules only from my Profile folder?

Skip to main content