PowerTip: Override Modules in PowerShell Session


Summary: Learn how to override the modules you have imported into your Windows PowerShell session.

Hey, Scripting Guy! Question How can I re-load the Windows PowerShell module that I am developing so I can test the changes at each
           stage of development?

Hey, Scripting Guy! Answer By default, if you have a module loaded into to your Windows PowerShell session and you attempt to re-load it,
           nothing happens because Import-Module discovers it is already loaded. Use the –Force parameter to ensure
           that a fresh copy of the module is loaded and you get your latest features:

Import-Module <mymodule> -Force

Comments (0)

Skip to main content