0

In Powershell 4, I'm attempting to install the GoogleCloud module.

I use the command:

Install-Module GoogleCloud 

It fails with:

PackageManagement\Install-Package : Illegal characters in path. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSModule.psm1:1417 char:21 + $null = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exce ption + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.TestModuleManifestCommand,Microso ft.PowerShell.PackageManagement.Cmdlets.InstallPackage 

I've tried:

  • switching Set-Location to a simple path, i.e. C:\jason

  • switching the Env:path to a simple lath, i.e. C:\jason\

4
  • Please share output from (Get-Module PowerShellGet).Version.ToString(). Maybe that Update-Module -Name PowerShellGet -Force could help? Commented Mar 12, 2019 at 11:37
  • Update-Module : Module 'PowerShellGet' was not installed by using Install-Module, so it cannot be updated. At line:1 char:1 + Update-Module -Name PowerShellGet -Force + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (PowerShellGet:String) [Write-Error], WriteErrorException + FullyQualifiedErrorId : ModuleNotInstalledUsingInstallModuleCmdlet,Update-Module Commented Mar 13, 2019 at 15:58
  • (Get-Module PowerShellGet).Version.ToString() 1.0.0.1 Commented Mar 13, 2019 at 15:59
  • Install-Module PowerShellGet -Force and then restart PowerShell session (should install version 2.0.4). Commented Mar 13, 2019 at 22:08

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.