Install-Module not successfully installing modules


  • Everything seems to be working correctly, but after the install, the module still does not show up. This has happened with multiple modules. Here is the verbose output:

    VERBOSE: The installation scope is specified to be 'AllUsers'.
    VERBOSE: The specified module will be installed in 'C:\Program Files\WindowsPowerShell\Modules'.
    VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
    VERBOSE: Downloading module 'MSOnline' with version '' from the repository
    VERBOSE: Searching repository ''MSOnline'' for ''.
    VERBOSE: InstallPackage' - name='MSOnline',
    VERBOSE: DownloadPackage' - name='MSOnline',
    VERBOSE: Downloading ''.
    VERBOSE: Completed downloading ''.
    VERBOSE: Completed downloading 'MSOnline'.
    VERBOSE: Hash for package 'MSOnline' does not match hash provided from the server.
    VERBOSE: InstallPackageLocal' - name='MSOnline',
    VERBOSE: Catalog file '' is not found in the contents of the module 'MSOnline' being installed.
    VERBOSE: Valid authenticode signature found in the file 'MSOnline.psd1' for the module 'MSOnline'.

    Thursday, December 6, 2018 1:54 AM

All replies

  • Turn of "Verbose"  These are not errors.


    Thursday, December 6, 2018 2:26 AM
  • No errors occur when I run the command, but the module still does not install.
    Thursday, December 6, 2018 5:42 PM
  • How do you know it doesn't install.

    You must be running in a 64 bit session to use MSOnline.

    get-module -list msonline


    Thursday, December 6, 2018 9:21 PM
  • I think I am running 64 bit. Ran two commands to check what version of PS is running. Both indicate 64-bit.

    PS C:\Windows\system32> [IntPtr]::Size -eq 8

    PS C:\Windows\system32> $([System.Runtime.InterOpServices.Marshal]::SizeOf([System.IntPtr]::Zero)*8)

    Ran the command you gave, it isn't listed. I ran get-module -listavailable, still not listed. To me, that seems like it isn't installing. 

    • Edited by Mike Wat Thursday, December 6, 2018 11:01 PM
    Thursday, December 6, 2018 10:55 PM
  • How to get current platform and session:

    PS D:\scripts> [environment]::Is64BitOperatingSystem
    PS D:\scripts> [environment]::Is64BitProcess

    What is your $env:PsModulePath

     $env:PsModulePath -split ';'

    Here is where it should install:

    dir 'C:\Program Files\WindowsPowerShell\Modules\Msonline'


    Thursday, December 6, 2018 11:18 PM
  • Got true on both commands.

    PS C:\Windows\system32>  $env:PsModulePath -split ';'
    C:\Program Files\WindowsPowerShell\Modules

    dir : Cannot find path 'C:\Program Files\WindowsPowerShell\Modules\Msonline' because it does not exist.

    • Edited by Mike Wat Thursday, December 6, 2018 11:23 PM
    Thursday, December 6, 2018 11:22 PM
  • You must be logged in as admin and running elevated. 

    Install-Module MsOnline -Force

    If that still fails then you have system problems that you will have to track down.


    Thursday, December 6, 2018 11:27 PM
  • I was running elevated as admin. Tried the command you gave. Any ideas where I can start tracking down that system problem? I ran sfc /scannow and had no luck.

    This was really more of an annoyance than something that blocks me from working. I just manually downloaded and copied the module to the proper directory. Install-module was much more convenient. 

    Thanks for your assistance.

    • Edited by Mike Wat Thursday, December 6, 2018 11:50 PM
    Thursday, December 6, 2018 11:30 PM
  • I would start with the event log.  System, Application, PowerShell.


    Thursday, December 6, 2018 11:59 PM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,


    Just do it.

    Tuesday, December 11, 2018 6:35 AM