I am trying to install psget on windows 10 from powershell in admin mode but I get:
PS C:\Windows\system32> (new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
Downloading PsGet from https://github.com/psget/psget/raw/master/PsGet/PsGet.psm1
Invoke-WebRequest : The given path's format is not supported.
At line:42 char:13
+ Invoke-WebRequest -Uri $Url -OutFile $SaveToLocation
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
+ FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Import-Module : The specified module 'C:\Users\myuser\Documents\WindowsPowerShell\Modules C:\Users\myuser\Documents\WindowsPowerShell\Modules\PsGet' was not loaded
because no valid module file was found in any module directory.
At line:105 char:9
+ Import-Module -Name $Destination\PsGet
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (C:\Users\myuser\Do...l\Modules\PsGet:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
PsGet is installed and ready to use
USAGE:
PS> import-module PsGet
PS> install-module PsUrl
For more details:
get-help install-module
Or visit http://psget.net
PS C:\Windows\system32>
As suggested below PsGet is actually already installed on windows 10. I have then continued with the next step:
and as can be seen it installs successfully (needs to be done running as administrator). After a restart of the powershell console I still don't get any color highlighting though:
Any ideas?
Btw: the folder C:\Users[my-user]\Documents\WindowsPowerShell\Modules is empty:
Um... psget as in PowerShellGet module that I am almost certain comes on Win 10. I believe your error is even telling you that. Where it says PsGet is installed and ready to use.
Looks like the script at http://psget.net/GetPsGet.ps1
tries to decide where to install by querying for @($env:PSModulePath -split ';')
and then limit the search for paths under Documents\WindowsPowerShell\Modules
.
It appears that in your computer, PSModulePath includes twice the folder C:\Users\myuser\Documents\WindowsPowerShell\Modules
, which causes an issue with the installation script.
You can do either one of these two options to solve it:
C:\Users\myuser\Documents\WindowsPowerShell\Modules
from the PSModulePath variable.PsGet
manually using the instructions in the official website.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With