endurium
endurium

Reputation: 1011

PowerShell gallery module doesn't install

I'm trying to install the PSExcel module from the Powershell gallery at https://www.powershellgallery.com/packages/PSExcel/1.0.2, but when I try to install it I get the following verbose output and the module isn't installed (I've started Powershell ISE as admin):

PS H:\> install-module -name PSExcel -verbose -Repository psgallery
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2'; IsTrusted = 'False'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'psgallery'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSExcel'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'PSExcel'.
VERBOSE: Skipping installed module PSExcel 1.0.2.

Using Get-Module -ListAvailable shows that the module is installed but hasn't exported any commands.

ModuleType Version    Name                                ExportedCommands                                                                                                                                                                                       
---------- -------    ----                                ----------------                                                                                                                                                                                       
Manifest   1.9.0      7Zip4Powershell                     {Expand-7Zip, Compress-7Zip, Get-7Zip, Get-7ZipInformation}                                                                                                                                            
Script     3.7        Get-MediaInfo                       {Get-MediaInfo, Get-MediaInfoValue, Get-MediaInfoSummary, gmi...}                                                                                                                                      
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}                                                                                                                                                  
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}                                                                                                                                 
Script     3.4.0      Pester                              {Describe, Context, It, Should...}                                                                                                                                                                     
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}                                                                                                                                           
Script     1.0.2      PSExcel                                                                                         

Why won't the module install and export it's commands?

I'm using PowerShell 5.1 for Windows.

Upvotes: 0

Views: 1515

Answers (1)

endurium
endurium

Reputation: 1011

I think I've figured it out - I needed to import the module after installing it.

The commands were:

install-module -name PSExcel -verbose -Repository psgallery -AllowClobber -Force

Then:

Import-Module -Name PSExcel -verbose

Upvotes: 0

Related Questions