When using PoshBot in an interactive shell, the module remains loaded in the session even if a bot instance is stopped and later started. Plugin modules are imported into PoshBot's scope.
This means that after a plugin module has been imported once, subsequent calls to Import-Module will not do anything. If new plugin functions have been added PoshBot will not know about them after stopping and starting the instance.
Using -Force ensures that modules are always (re)loaded from disk.
Should use
-Force
when importing plugin modulesDescription
When using PoshBot in an interactive shell, the module remains loaded in the session even if a bot instance is stopped and later started. Plugin modules are imported into PoshBot's scope.
This means that after a plugin module has been imported once, subsequent calls to
Import-Module
will not do anything. If new plugin functions have been added PoshBot will not know about them after stopping and starting the instance.Using
-Force
ensures that modules are always (re)loaded from disk.Related Issue
https://github.com/poshbotio/PoshBot/issues/117
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: