Windowsにsshした際のデフォルトシェルをPowerShell7に変更する

公開日時

Windowsにsshした際のデフォルトシェルがコマンドプロンプトだったのでPowerShell7に変更した。

# PowerShell7のpathを取得
Get-Command pwsh.exe

# デフォルトシェルをPowerShell7に変更
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\PowerShell\7\pwsh.exe" -PropertyType String -Force

sshすると正しくPowerShell7に変更されている。

ssh windows

PowerShell 7.0.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

PS C:\Users\windows>

参考


Related #windows

docker-credential-desktop.exe not installed or not available in PATH

rm ~/.docker/config.jsonしたら起動できた

WindowsマシンにSSD増設

Samsung SSD 860 EVOを購入

Windows TerminalのデフォルトをUbuntuターミナルに変更する

defaultProfileをUbuntuのguidに変更する

Windows10でPowerShellからシャットダウンする

shutdown.exeを使う

Windows 10をWake On LANで起動する

Windows10 HomeエディションでもChromeリモートデスクトップが使えた

SteamでPS3コントローラーを使う

PlayStation Nowをインストールする