<p>Thanks for the comments. I was able to figure out. I ran the complete command from win_command instead of having the arguments in stdin.</p>

CC BY-SA 4.0
2019-01-14T07:58:35.960Z
2019-09-26T09:54:51.627Z
2019-09-26T09:54:51.627Z
MsbuildUser
<p>I trying to execute the below command and running into errors ... I tried with quoting around the arguments, that didn't help either</p>

<pre><code>   - name: Add authorization rules to FTP site
     win_command: appcmd.exe 
   - args:
      chdir: C:\Windows\System32\inetsrv\
      stdin: set config "FTP_FW" 
   - section: system.ftpServer/security/authorization /+"[accessType='Allow',roles='domain\usera',permissions='Read, Write']" /commit:apphost
</code></pre>

<p>Tried with quoting, that didn't help ... Can you give me some pointers pls.</p>

CC BY-SA 4.0
2019-01-07T07:23:15.113Z
Could you format to make it look like a playbook and mention the error message you receive ?
Marged
CC BY-SA 4.0
2019-01-12T16:35:44.783Z
`I trying to execute the below command and running into errors`. Please add the errors as well.
030
<ansible>
Trying to execute an appcmd command via Ansible
MsbuildUser
# Trying to execute an appcmd command via Ansible

(Asked by: username_0 on 2019-01-07)

I trying to execute the below command and running into errors ... I tried with quoting around the arguments, that didn't help either
   - name: Add authorization rules to FTP site
     win_command: appcmd.exe 
   - args:
      chdir: C:\Windows\System32\inetsrv\
      stdin: set config "FTP_FW" 
   - section: system.ftpServer/security/authorization /+"[accessType='Allow',roles='domain\usera',permissions='Read, Write']" /commit:apphost

Tried with quoting, that didn't help ... Can you give me some pointers pls.

**Tags:** ansible

> **Comments:**
> **username_1**: Could you format to make it look like a playbook and mention the error message you receive ?  
> **username_2**: `I trying to execute the below command and running into errors`. Please add the errors as well.  

---

## 1 answers

### Answer by username_0 on 2019-01-14. Score: -1 | Accepted answer

Thanks for the comments. I was able to figure out. I ran the complete command from win\_command instead of having the arguments in stdin.


---

