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"