From 40081477db062c212930edbdd3d000a2f533e7b8 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Fri, 26 Mar 2021 12:44:13 +0100 Subject: [PATCH] Add admin check --- Scripts/enable-ssh-client.ps1 | 2 ++ Scripts/enable-ssh-server.ps1 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Scripts/enable-ssh-client.ps1 b/Scripts/enable-ssh-client.ps1 index 2ec620dd..30b38537 100755 --- a/Scripts/enable-ssh-client.ps1 +++ b/Scripts/enable-ssh-client.ps1 @@ -6,6 +6,8 @@ .NOTES Author: Markus Fleschutz / License: CC0 #> +#Requires -RunAsAdministrator + try { Add-WindowsCapability -Online -Name OpenSSH.Client* diff --git a/Scripts/enable-ssh-server.ps1 b/Scripts/enable-ssh-server.ps1 index 56517270..80b8c3a5 100755 --- a/Scripts/enable-ssh-server.ps1 +++ b/Scripts/enable-ssh-server.ps1 @@ -6,6 +6,8 @@ .NOTES Author: Markus Fleschutz / License: CC0 #> +#Requires -RunAsAdministrator + try { Add-WindowsCapability -Online -Name OpenSSH.Server* Start-Service sshd