Windows server core can be managed remotely easily using VSCode capabilities, thanks to its built-in filesystem feature.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/45f39920-3ca9-439f-a2de-53882974402f/Untitled.png

From Remote coding to Remote management

VSCode is a great open source success. It has become a must have application in a few years of existence. Tons of developers have created tons of plugins, from Python development to edition of Yaml configuration files (with "intellisense", Microsoft name for auto completion + syntax highlighting + go to definition), there is a plugin for everything (coding, analysis, powershell, bash, ...). VSCode is so fast that it nicely replaces any text editor, including notepad. Thank you Microsoft!

Recently, VSCode has improved by filling a new gap, with the flagship feature "remote coding". With remote coding, VSCode connects to any machine (linux or windows), any docker container, any Azure VM, and anything supporting its virtual filesystem plugin, and you can start edit files and use plugins and execute remote commands.

This is where we start

To use "Remote coding", install the plugin "Remote Development". It includes SSH, Docker and WSL (Linux) filesystem plugins.

To manage our windows machine, we will enable the OpenSSH server bundled with Windows Server 2019, and we will use the Remote-SSH VSCode plugin to open a folder on the server. From there, you will be able to view the filesystem in the VSCode folder view, upload files by drag/dropping in this folder view, edit any file directly, use the powershell command prompt directly from VSCode, ...

No need to fear about the security: by default all local users can connect to the ssh server, using their user name and password.

Install the bundled OpenSSH server on Windows Server

Open an elevated powershell prompt and execute these commands:

Get-WindowsCapability -Online -Name Open*

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

It will install 2 services (disabled). Verify that with this command:

Get-Service sshd,ssh-agent