appleboy / appleboy/ssh-action
Unable to run multiple commands on windows servers
- Dominant language
- Shell
- Stars
- 6.2k
- Forks
- 679
- Avg merge
- 35m
- Merged PRs (30d)
- 1
Description
Unable to run multiple commands on windows server. Only the first command is getting executed.
```
- name: SSH to Windows Node
uses: appleboy/ssh-action@1a8b3784eaa665f677fa114edd5683bb6a6bfaa8 # master hash on July 12, 2021 (newer than v0.1.4)
continue-on-error: true
with:
script: |
powershell.exe
$service = Get-Service twistlockDefender -ErrorAction SilentlyContinue
$script={ if ("$args[0]" -match "Running") { echo 'Service Already Installed' } else { echo 'Service Installation Needed' }}
powershell.exe -Command $script -args $service.status
host: << HOST_IP >>
username: << HOST_USERNAME >>
password: << HOST_PASSWORD >>
```

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.