Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2019-01-14T07:58:35.960Z
Answers: 2019-09-26T09:54:51.627Z
Answers: 2019-09-26T09:54:51.627Z
Answers: MsbuildUser
Body: <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>
  
Comments: CC BY-SA 4.0
Comments: 2019-01-07T07:23:15.113Z
Comments: Could you format to make it look like a playbook and mention the error message you receive ?
Comments: Marged
Comments: CC BY-SA 4.0
Comments: 2019-01-12T16:35:44.783Z
Comments: `I trying to execute the below command and running into errors`. Please add the errors as well.
Comments: 030
Tags: <ansible>
Title: Trying to execute an appcmd command via Ansible
UserDisplayName: MsbuildUser
ThreadText: # 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.
  
  
  ---
  
  