Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\PowerShell\7\pwsh.exe" -PropertyType String -Force
Get-Item -Path "HKLM:\SOFTWARE\OpenSSH"
OpenSSH using PowerShell Configuring OpenSSH-Server (sshd) on Windows 11