Jeffrey Winn's Blog

Assorted thoughts and information of nominal value

View on GitHub

As you know, the OpenSSH service for Windows under Windows 10 does not start automatically. Not sure why.

To fix that, and with help from the Internet, I wrote this simple Powershell script:

Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "Start-Service sshd"'

…this calls powershell.exe as Administrator (resulting in a permission dialog) and starts the service. To get to this Powershell script, I placed the following Visual Basic Script (VBS) in my startup area:

Set objShell = CreateObject("Wscript.shell")
objShell.run("powershell -Executionpolicy Bypass -nologo -noninteractive -file C:\Users\jeffr\bin\StartService-sshd.ps1")

…arguably, this is messy, but it works.

…Get back