none
Install-Module not successfully installing modules

    Question

  • 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 '1.1.183.17' from the repository
    'https://www.powershellgallery.com/api/v2'.
    VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='MSOnline'' for ''.
    VERBOSE: InstallPackage' - name='MSOnline',
    version='1.1.183.17',destination='C:\Users\samwatterson\AppData\Local\Temp\1753149301'
    VERBOSE: DownloadPackage' - name='MSOnline',
    version='1.1.183.17',destination='C:\Users\samwatterson\AppData\Local\Temp\1753149301\MSOnline\MSOnline.nupkg',
    uri='https://www.powershellgallery.com/api/v2/package/MSOnline/1.1.183.17'
    VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/MSOnline/1.1.183.17'.
    VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/MSOnline/1.1.183.17'.
    VERBOSE: Completed downloading 'MSOnline'.
    VERBOSE: Hash for package 'MSOnline' does not match hash provided from the server.
    VERBOSE: InstallPackageLocal' - name='MSOnline',
    version='1.1.183.17',destination='C:\Users\samwatterson\AppData\Local\Temp\1753149301'
    VERBOSE: Catalog file 'MSOnline.cat' 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
    Moderator
  • 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
    Moderator
  • 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
    True

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

    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
    True
    PS D:\scripts> [environment]::Is64BitProcess
    True

    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
    Moderator
  • Got true on both commands.

    PS C:\Windows\system32>  $env:PsModulePath -split ';'
    C:\Users\samwatterson\Documents\WindowsPowerShell\Modules
    C:\Program Files\WindowsPowerShell\Modules
    C:\Windows\system32\WindowsPowerShell\v1.0\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
    Moderator
  • 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
    Moderator