2024-04-23 13:21:26 +00:00
|
|
|
+++
|
2024-04-23 13:28:33 +00:00
|
|
|
date = "2020-06-01"
|
2024-04-23 13:21:26 +00:00
|
|
|
tags = ["windows"]
|
|
|
|
title = "windowsの必須ツールをupdateしてみる"
|
|
|
|
slug = "win"
|
|
|
|
+++
|
|
|
|
|
|
|
|
windowsがWSL2, terminalなどリリースしてたりしたので、色々とupdateしてみました。
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ scoop install curl 7z
|
|
|
|
|
|
|
|
# powershell 7.0.1
|
|
|
|
# https://github.com/PowerShell/PowerShell/releases
|
|
|
|
$ curl -LO https://github.com/PowerShell/PowerShell/releases/download/v7.0.1/PowerShell-7.0.1-win-x64.msi
|
|
|
|
$ msiexec.exe /package PowerShell-7.0.1-win-x64.msi /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1
|
|
|
|
|
|
|
|
# openssh v8.1.0
|
|
|
|
# https://github.com/PowerShell/Win32-OpenSSH/releases
|
|
|
|
$ curl -LO https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.1.0.0p1-Beta/OpenSSH-Win64.zip
|
|
|
|
$ 7z x OpenSSH-Win64.zip
|
|
|
|
$ cp OpenSSH-Win64/* 'c:\programfiles\OpenSSH\'
|
|
|
|
or
|
|
|
|
$ robocopy .\OpenSSH-Win64\ 'c:\Program Files\OpenSSH\'
|
|
|
|
|
|
|
|
# terminal 1.0.1
|
|
|
|
# https://github.com/microsoft/terminal/releases
|
|
|
|
$ curl -LO https://github.com/microsoft/terminal/releases/download/v1.0.1401.0/Microsoft.WindowsTerminal_1.0.1401.0_8wekyb3d8bbwe.msixbundle
|
|
|
|
$ Add-AppxPackage ./Microsoft.WindowsTerminal_1.0.1401.0_8wekyb3d8bbwe.msixbundle
|
|
|
|
```
|
|
|
|
|
|
|
|
`robocopy`は例えば、sshdというprocessが起動していても上書きするので便利です。
|
|
|
|
|
|
|
|
### winget
|
|
|
|
|
|
|
|
今までは、scoopを愛用してたけど、wingetが公式で提供され始めたので、よさそうだったら使っていきたい。
|
|
|
|
|
|
|
|
https://github.com/microsoft/winget-cli
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ curl -LO https://github.com/microsoft/winget-cli/releases/download/v0.1.4331-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle
|
|
|
|
$ Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle
|
|
|
|
$ winget
|
|
|
|
```
|
|
|
|
|
|
|
|
なお、ssh経由では、wingetは使用できない感じでした。アクセス権関連ぽい気がする。これは採用しづらい...。
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ scoop install which
|
|
|
|
$ which winget
|
|
|
|
c:\Users\syui\AppData\Local\Microsoft\WindowsApps\winget.EXE
|
|
|
|
```
|
|
|
|
|
|
|
|
issue : https://github.com/microsoft/winget-cli/issues/256
|
|
|
|
|
|
|
|
### 参照
|
|
|
|
|
|
|
|
https://docs.microsoft.com/ja-jp/powershell/scripting/install/installing-powershell-core-on-windows
|
|
|
|
|
|
|
|
https://docs.microsoft.com/en-us/powershell/module/appx/add-appxpackage
|