Home > Mobile >  I created a custom powershell .psm1 module but it won't update after an edit
I created a custom powershell .psm1 module but it won't update after an edit

Time:01-07

I created a custom powershell module in the C:\Program Files\WindowsPowerShell\Modules\PennoniAppManagement directory. Whenever I make changes to a function in the module, then import the module into a script, the updated code won't take effect. Any solutions?

CodePudding user response:

Make sure you remove the already-loaded version of the module from the session before re-importing it:

Remove-Module PennoniAppManagement -Force
Import-Module PennoniAppManagement
  •  Tags:  
  • Related