automatically start and enable sshd

This commit is contained in:
2023-09-13 03:51:35 -04:00
parent 2767104d71
commit 14e43ee4c5

View File

@@ -32,4 +32,6 @@ if (-not (Test-Path 'C:\Program Files\Vim\vim90\vim.exe')) {
# sshd
if (-not (Get-WindowsCapability -Online | Where-Object Name -EQ "OpenSSH.Server~~~~0.0.1.0" | Where-Object State -EQ "Installed")) {
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
}