PowerTip: Easily Load all Windows PowerShell Modules

PowerTip: Easily Load all Windows PowerShell Modules

  • Comments 6
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • My list is empty, how do I fix this?

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

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

  • 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.