From 1c936710ee4fe3f3b5f827b2269de61e0a4a0ca7 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 31 Dec 2022 15:50:42 +0100 Subject: [PATCH] Allow powershell exec --- tasks/powershell.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/powershell.yml b/tasks/powershell.yml index cccb5c2..5372487 100644 --- a/tasks/powershell.yml +++ b/tasks/powershell.yml @@ -1,5 +1,10 @@ --- # See https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell +- name: Set Powershell Execution to Remote Signed + ansible.windows.win_powershell: + script: "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine" + changed_when: _fw.changed + - name: Install the OpenSSH Server ansible.windows.win_powershell: script: "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0"