PowerShell Scoop 命令安装及使用
Scoop 网址
官网
http://scoop.sh/
github
https://github.com/lukesampson/scoop
安装Scoop
- 第一步,打开powershell3.0+,输入以下代码,选择A【全是】
set-executionpolicy remotesigned -s cu
- 第二步,
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
安装异常
- 异常说明
使用“1”个参数调用“DownloadString”时发生异常:“无法连接到远程服务器” 所在位置 行:1 字符: 1>
+ iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
- 解决方法:
PS C:\Windows\system32> $wc = new-object net.webclient
PS C:\Windows\system32> $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
PS C:\Windows\system32> iex (new-object net.webclient).downloadstring('https://raw.githubusercontent.com/lukesampson/scoop/master/bin/install.ps1')
- 安装成功
Initializing...
Downloading scoop...
Extracting...
Creating shim...
Downloading main bucket...
Extracting...
Adding ~\scoop\shims to your path.
'lastupdate' has been set to '2020-02-17T17:20:44.3492878+08:00'
Scoop was installed successfully!
Type 'scoop help' for instructions.
使用
- scoop install …