# Jenkins - cannot run WinRMClient Plugin with Powershell command

**URL:** <https://community.jenkins.io/t/jenkins-cannot-run-winrmclient-plugin-with-powershell-command/873>\
**Category:** Ask a question\
**Created:** [November 24, 2021, 6:31pm UTC](https://community.jenkins.io/t/jenkins-cannot-run-winrmclient-plugin-with-powershell-command/873 "2021-11-24T18:31:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cane](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cane](https://community.jenkins.io/u/cane)\
**Post date:** [November 24, 2021, 6:31pm UTC](https://community.jenkins.io/t/jenkins-cannot-run-winrmclient-plugin-with-powershell-command/873/1 "2021-11-24T18:31:38Z")

</div>

I am trying to run WinRMClient Plugin on my Jenkins slave (alpine docker). [plugins-wiki-docs/README.md at 9162c2f7e00d43ad3b7af1cc1c918ad7b3368475 · jenkins-infra/plugins-wiki-docs · GitHub](https://github.com/jenkins-infra/plugins-wiki-docs/blob/9162c2f7e00d43ad3b7af1cc1c918ad7b3368475/winrm-client/README.md) I installed the powershell and all dependent libraries with curl, and make a symbolic link to access the “powershell” command which is being triggered by the Plugin.

Now I want to run WinRMClient commands so I defined this in Pipeline step:

```auto
    stage ('WinRM stage') {
      steps {
        winRMClient credentialsId: 'ac0c0', hostName: '10.1.175.143',
        winRMOperations: [invokeCommand('dir'), sendFile(configurationName: 'DataNoLimits', destination: 'C:\\', source: 'package.json')]
      }
    }

```

But I am getting the following error in Console Output:

```auto
[Pipeline] winRMClient
$ docker exec bcf03f18dea9 powershell -NonInteractive 
"& '/tmp/jenkins1345282096390549594.ps1'"
The argument '& '/tmp/jenkins1345282096390549594.ps1'' is not recognized 
as the name of a script file. 
Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.

```

I don’t know how I can resolve this. I cannot effect how this Plugin invokes its methods (WinRMClient and WinRMOperations).

What can I do? Please help!

Thanks

---

<div class="post-metadata">

**Author:** ![Darbuki](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/darbuki/32/802_2.png) [@Darbuki](https://community.jenkins.io/u/Darbuki)\
**Post date:** [January 12, 2022, 11:52am UTC](https://community.jenkins.io/t/jenkins-cannot-run-winrmclient-plugin-with-powershell-command/873/2 "2022-01-12T11:52:53Z")

</div>

Hey, Im having the same struggle.  
Did you manage to solve it? if you did, can you share how?

---

<div class="post-metadata">

**Author:** ![cane](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cane](https://community.jenkins.io/u/cane)\
**Post date:** [January 12, 2022, 12:33pm UTC](https://community.jenkins.io/t/jenkins-cannot-run-winrmclient-plugin-with-powershell-command/873/3 "2022-01-12T12:33:26Z")

</div>

I didn’t resolve this
