Remove-Module / Import-Module issue.

Welcome Forums General PowerShell Q&A Remove-Module / Import-Module issue.

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
1 year, 4 months ago.

  • Author
    Posts
  • #74146

    Participant
    Points: 1
    Rank: Member

    I have a module and I made a modification, I changed the name of one of its functions, however, I cannot get the new name to show unless I type Import-Module, but, when I close the PS console and re-open it the old name STILL shows up.

    Typing Remove-Module I get this error:

    remove-module : No modules were removed. Verify that the specification of modules to remove is correct and
    runspace.
    At line:1 char:1
    + remove-module  IvanToolbox  -Force
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ResourceUnavailable: (:) [Remove-Module], InvalidOperationException
        + FullyQualifiedErrorId : Modules_NoModulesRemoved,Microsoft.PowerShell.Commands.RemoveModuleCommand
    

    In case you guys need to know this is my PSVersion 5.1.14393.1358

    What's the deal?

    Thanks

  • #74150

    Participant
    Points: 0
    Rank: Member

    Hi Ivan,

    Try this: Import-Module IvanToolbox -Force

    Check out this question which is similar to yours

    • #74153

      Participant
      Points: 1
      Rank: Member

      Thank s for the link.

      I was able to "fix" it by just typing Get-Module -ListAvailable, crazy!! but it seemed to work.

The topic ‘Remove-Module / Import-Module issue.’ is closed to new replies.