Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run multiple commands on windows servers #189

Open
MageshSrinivasulu opened this issue Oct 10, 2022 · 0 comments
Open

Unable to run multiple commands on windows servers #189

MageshSrinivasulu opened this issue Oct 10, 2022 · 0 comments

Comments

@MageshSrinivasulu
Copy link

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 >>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant