Have a look at the examples in the module 
documentation 
https://docs.ansible.com/ansible/latest/modules/win_shell_module.html#examples 
and you'll see the format is a little different.  
This ought to run your script.  

You might want to use the `script` module which can deliver your script to 
the remote machine and run it in the same step (script also works for 
windows targets).

- name: DPS Server Installation

  win_shell: C:\temp\nd6.1.1.20.7\Scripts\nd.Install\Install-DPS.ps1

Hope this helps,

Jon

On Saturday, August 4, 2018 at 6:43:38 AM UTC+1, Ali Khawaja wrote:
>
> Ansible version: 2.6.1 (and I tried with 2.7.0 development branch as well)
>
>  
>
> I have a simple win_shell task though which I am trying to execute 
> powershell script which is sitting on the remote system. I have verified 
> the path and the existence of script.
>
>  
>
> - name: DPS Server Installation
>
>   win_shell: 
>
>       args: C:\temp\nd6.1.1.20.7\Scripts\nd.Install\Install-DPS.ps1
>
>  
>
> Ansible keeps failing with the following error message:
>
>  
>
> TASK [DPS Server Installation] 
> ***********************************************************************************************************
>
> fatal: [i-01f6259784352dff3]: FAILED! => {"changed": false, "msg": 
> "Get-AnsibleParam: Missing required argument: _raw_params"}
>
>         to retry, use: --limit @/mnt/c/GitHub/alikha-spnd/autosp.retry
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/905d9018-87e9-4a3d-acee-9b9d6f6e3078%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to