Updating PowerShell Modules

by Sep 16, 2009

In a previous tip, you learned about the new modules in PowerShell v.2, which can be loaded using Import-Module. Once you have loaded a module, it is important to understand that it is cached until the PowerShell session ends. So even if you reload a module using Import-Module, you will still work with the module you loaded initially. While this is acceptable for performance reasons, it may be confusing during development. To actually see changes you made to a module, you need to re-import the module using Import-Module with the -force switch.

Twitter This Tip! ReTweet this Tip!