Can't install psget.

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 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 shown below, PsGet is actually already installed on Windows 10. Then I continued with the next step:

enter image description here

and, as you can see, it is successfully installed (must be run as an administrator). After rebooting the powershell console, I still don't get color highlighting:

enter image description here

Any ideas?

Btw: folder C: \ Users [my user] \ Documents \ WindowsPowerShell \ Modules is empty:

enter image description here

+4
source share
2 answers

Um... psget PowerShellGet, , Win 10. , . , , PsGet .

+1

, script at http://psget.net/GetPsGet.ps1 , , @($env:PSModulePath -split ';'), Documents\WindowsPowerShell\Modules.

, PSModulePath C:\Users\myuser\Documents\WindowsPowerShell\Modules, script.

:

  • C:\Users\myuser\Documents\WindowsPowerShell\Modules PSModulePath.
  • PsGet , .
+2

Source: https://habr.com/ru/post/1653935/


All Articles