Don’t do that: The following code remove and import a module in order to get the latest changes of a module.
Indeed, when creating a module, we could need to reload the module into the current session to work with the latest changes (useful during development).
Remove-Module -Name module
Import-Module -Name .\module.psd1
Do that: It’s easier to reload the module with the –Force parameter:
Import-Module -Name .\module.psd1 -Force