# error running win\_command with playbook

**URL:** <https://forum.ansible.com/t/error-running-win-command-with-playbook/27759>\
**Category:** Ansible Project\
**Created:** [June 10, 2018, 6:22am UTC](https://forum.ansible.com/t/error-running-win-command-with-playbook/27759 "2018-06-10T06:22:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![doppalapudi\_saikumar](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@doppalapudi\_saikumar](https://forum.ansible.com/u/doppalapudi_saikumar)\
**Post date:** [June 10, 2018, 6:22am UTC](https://forum.ansible.com/t/error-running-win-command-with-playbook/27759/1 "2018-06-10T06:22:01Z")

</div>

I was able to run on cmd prompt but when I run it it hangs .Nothing happens. please let me know how to execute this using playbook.

- hosts: web-servers  
vars:  
SnapdriveAcc: xxxxx\xxxxxxx  
SnapdrivePW: xxxxxxxx

tasks:

#- name: snapdrive  
#win\_command: C:\NetApp\02\_SnapDrive7.1.4P1\_x64.exe  
#args:  
#stdin: /s /v "/qn SILENT\_MODE=1 /Li C:\NetApp\SDInstall.log INSTALLDIR="c:\Program Files\NetApp\SnapDrive" SVCUSERNAME={{SnapdriveAcc}} SVCUSERPASSWORD={{SnapdrivePW}} SVCCONFIRMUSERPASSWORD={{SnapdrivePW}} IGNORE\_COMPMGMT\_RUNNING=1 SDW\_WEBSRV\_TCP\_PORT=808 SDW\_WEBSRV\_HTTP\_PORT=4094 SDW\_WEBSRV\_HTTPS\_PORT=4095 TRANSPORT\_SETTING\_ENABLE=1 DFM\_SERVER\_COMM\_PRT\_SELECTION=1 DFM\_SERVER\_COM\_PORT=8088 DFM\_SERVER\_USERNAME={{SnapdriveAcc}} DFM\_SERVER\_PASSWORD={{SnapdrivePW}} SDW\_ESXSVR\_ENABLE=0 SDW\_SMVISVR\_ENABLE=0"

- name: snapdrive  
win\_command:  
path: C:\NetApp\02\_SnapDrive7.1.4P1\_x64.exe /s /v /qn /Li C:\NetApp\SDInstall.log  
arguments:  
SILENT\_MODE: 1  
INSTALLDIR: c:\Program Files\NetApp\SnapDrive  
SVCUSERNAME: “{{SnapdriveAcc}}”  
SVCUSERPASSWORD: “{{SnapdrivePW}}”  
SVCCONFIRMUSERPASSWORD: “{{SnapdrivePW}}”  
IGNORE\_COMPMGMT\_RUNNING: 1  
SDW\_WEBSRV\_TCP\_PORT: 808  
SDW\_WEBSRV\_HTTP\_PORT: 4094  
SDW\_WEBSRV\_HTTPS\_PORT: 4095  
TRANSPORT\_SETTING\_ENABLE: 1  
DFM\_SERVER\_COMM\_PRT\_SELECTION: 1  
DFM\_SERVER\_COM\_PORT: 8088  
DFM\_SERVER\_USERNAME: “{{SnapdriveAcc}}”  
DFM\_SERVER\_PASSWORD: “{{SnapdrivePW}}”  
SDW\_ESXSVR\_ENABLE: 0  
SDW\_SMVISVR\_ENABLE: 0

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [June 11, 2018, 10:09am UTC](https://forum.ansible.com/t/error-running-win-command-with-playbook/27759/2 "2018-06-11T10:09:41Z")

</div>

Can you share the actual command line you used on windows.  
It looks like you have command line arguments in the ‘path’ of your ‘win\_command’ module
