Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Install OenSSH
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
# Set service to automatic and start
Set-Service sshd -StartupType Automatic
Start-Service sshd
# Configure PowerShell as the default shell
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
# Restart the service
Restart-Service sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment