Problem with ansible winrm

Hi

I try to get winrm up ans running. I have many servers (30) where is working but some not working (5)with this message

fatal: [Servername]: FAILED! => {“changed”: false, “failed”: true, “module_stderr”: “Le terme « ConvertFrom-Json » n’est pas reconnu comme nom d’applet de commande,\r\n fonction, fichier de script ou programme exécutable. Vérifiez l’orthographe du\r\n nom, ou si un chemin d’accès existe, vérifiez que le chemin d’accès est correc\r\nt et réessayez.\r\nAu niveau de ligne : 31 Caractère : 71\r\n+ $payload = ConvertTo-HashtableFromPsCustomObject (ConvertFrom-Json <<<< \r\n$json_raw)\r\n + CategoryInfo : ObjectNotFound: (ConvertFrom-Json:String) , Pa \r\n rentContainsErrorRecordException\r\n + FullyQualifiedErrorId : CommandNotFoundException\r\n \r\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE”, “rc”: 1}f

Excused is it in french but the essentiel message tell the applet name wasn’t recognized, Verify the syntax or if the directory exist and retry.

The connection to the winrm is done (verified in the event viewer), i think the problem was with the creation of the directory.

Any tips , tricks or something was appreciated. I search for a few day now

Make sure you meet the requirements for Ansible as documented here http://docs.ansible.com/ansible/devel/windows_setup.html#host-requirements. It requires at least PowerShell v3 which is when the ConvertTo-Json cmdlet was added.

Thank you Jordan

It was the problem for a few server and the firewall rules for some another server.