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\

  • Please share output from `(Get-Module PowerShellGet).Version.ToString()`. Maybe that `Update-Module -Name PowerShellGet -Force` could help? – JosefZ Mar 12 '19 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 – Jason Shindler Mar 13 '19 at 15:58
  • (Get-Module PowerShellGet).Version.ToString() 1.0.0.1 – Jason Shindler Mar 13 '19 at 15:59
  • `Install-Module PowerShellGet -Force` and then restart PowerShell session (should install version `2.0.4`). – JosefZ Mar 13 '19 at 22:08

0 Answers0