# Win\_ping issue "Could not find the shell plugin required"

**URL:** <https://forum.ansible.com/t/win-ping-issue-could-not-find-the-shell-plugin-required/42293>\
**Category:** Get Help\
**Tags:** windows, ssh, wsl2, ping, ubuntu\
**Created:** [April 30, 2025, 2:46pm UTC](https://forum.ansible.com/t/win-ping-issue-could-not-find-the-shell-plugin-required/42293 "2025-04-30T14:46:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rokas101](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Rokas101](https://forum.ansible.com/u/Rokas101)\
**Post date:** [April 30, 2025, 2:46pm UTC](https://forum.ansible.com/t/win-ping-issue-could-not-find-the-shell-plugin-required/42293/1 "2025-04-30T14:46:12Z")

</div>

I’m running WSL2 Ubuntu 24.04.2 LTS as Ansible host and a Windows 11 VM on Hyper-V as a remote node with SSH enabled.  
The VM is reachable from the host with ping and SSH, however when I run:

```bash
ansible myhosts -m win_ping -i inventory.ini

```

I get an error:

> fatal: [my.windows.vm.ip]: FAILED! =\> {“msg”: “Could not find the shell plugin required (powershell # Windows’ default is cmd, which is not compatible with most scripts.).”}

inventory.ini file:

```ini
[myhosts]
my.windows.vm.ip

[all:vars]
ansible_user=plain_text_user
ansible_ssh_pass=plain_text_password
ansible_connection=ssh

remote_tmp=~/.ansible/tmp
ansible_shell_type=powershell
ansible_ssh_common_args='-o StrictHostKeyChecking=no' 

```

The target VM automatically uses PowerShell once ssh’ed.  
I’ve tried setting `ansible_shell_type=cmd` however the error is nearly the same:

> 172.22.85.167 | FAILED! =\> {  
> “msg”: “Could not find the shell plugin required (cmd # Windows’ default is cmd, which is not compatible with most scripts.).”  
> }

ansible version: ansible [core 2.18.5]  
ansible.windows 2.8.0

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [April 30, 2025, 6:46pm UTC](https://forum.ansible.com/t/win-ping-issue-could-not-find-the-shell-plugin-required/42293/2 "2025-04-30T18:46:34Z")

</div>

This would indicate your `ansible_shell_type` in the inventory is not `ansible_shell_type=powershell` but rather `ansible_shell_type=cmd # Windows’ default is cmd, which is not compatible with most scripts.` (with the comment). Remove the comment and make sure that your inventory is the one actually being used and that there is no `ansible_shell_type` set anywhere else with a higher precedence.

---

<div class="post-metadata">

**Author:** ![Rokas101](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Rokas101](https://forum.ansible.com/u/Rokas101)\
**Post date:** [May 1, 2025, 3:11pm UTC](https://forum.ansible.com/t/win-ping-issue-could-not-find-the-shell-plugin-required/42293/3 "2025-05-01T15:11:01Z")

</div>

It worked, thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 31, 2025, 3:11pm UTC](https://forum.ansible.com/t/win-ping-issue-could-not-find-the-shell-plugin-required/42293/4 "2025-05-31T15:11:26Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
