PowerShell Scoop 命令安裝及使用

PowerShell Scoop 命令安裝及使用

Scoop 網址

官網
http://scoop.sh/

github
https://github.com/lukesampson/scoop

安裝Scoop

  1. 第一步,打開powershell3.0+,輸入以下代碼,選擇A【全是】 set-executionpolicy remotesigned -s cu
  2. 第二步,iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

安裝異常

  1. 異常說明
使用“1”個參數調用“DownloadString”時發生異常:“無法連接到遠程服務器” 所在位置 行:1 字符: 1>
+ iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
  1. 解決方法:
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')
  1. 安裝成功
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.

使用

  1. scoop install …
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章