无法安装psget

u12*_*123 5 powershell

我试图在管理模式下从powershell在Windows 10上安装psget,但我得到:

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>
Run Code Online (Sandbox Code Playgroud)

如下所示,PsGet实际上已安装在Windows 10上.然后我继续下一步:

在此输入图像描述

并且可以看出它安装成功(需要以管理员身份运行).重新启动powershell控制台后,我仍然没有得到任何颜色突出显示:

在此输入图像描述

有任何想法吗?

顺便说一句:文件夹C:\ Users [my-user]\Documents\WindowsPowerShell\Modules为空:

在此输入图像描述

Pat*_*vay 3

嗯... psget 与 PowerShellGet 模块一样,我几乎可以肯定它会出现在 Win 10 上。我相信您的错误甚至告诉您这一点。其中显示 PsGet 已安装并可供使用。