3
votes

First, I would like to say that I'm a total beginner, so please try not to use to complexe words. I use Powershell V5 and I need to run the following line :

Install-Module ImportExcel -scope CurrentUser

But an error message appears

Install-Module : Le terme «Install-Module» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès est correct et réessayez.

en:

The term 'Install-Module' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I have the Powershell version 5.0 :

PSVersion 5.0.10586.117
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.117
CLRVersion 4.0.30319.36366
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

1
whats your powershell version? - 4c74356b41
Install-Module is part of the PowerShellGet Module The PowerShellGet module is installed with Windows PowerShell 5.0 and later releases of Windows PowerShell. - user6811411
At minimum PS3.0 is required to install from here - user6811411
See your PowerShell version using $PSVersionTable. - lit
Now, I have the Powershell version 5.0, but the problem still remains the same. - Anthony

1 Answers

3
votes

Very importantly run PowerShell elevated as administrator on your Windows machine and then run

Find-Module -Name PowerShellGet | Install-Module
Find-Module -Name ImportExcel | Install-Module

If you are prompted, just select "Yes to all" for each of those commands, and let both complete and once that's finished, try again.

ImportExcel 6.0.0

PowerShell module to import/export Excel spreadsheets, without Excel.

source