I am using ansible hosted on linux to manage both linux and Windows VMs on 
azure. When I try to ping windows VMs from ansible using 

# ansible windows -m win_ping

I am getting below error:

test-windows.cloudapp.net | FAILED >> {
"failed": true, 
"msg": "The term 'ConvertFrom-Json' is not recognized as the name of a cmdlet, 
function\r\n, script file, or operable program. Check the spelling of the name, 
or if a pat\r\nh was included, verify that the path is correct and try 
again.\r\nAt 
C:\\Users\\coremedia\\AppData\\Local\\Temp\\ansible-tmp-1424263716.9-1357614051035\r\n00\\win_ping.ps1:54
 char:67\r\n+         $parameters = Get-Content $arguments[0] | 
ConvertFrom-Json <<<< ;\r\n    + CategoryInfo          : ObjectNotFound: 
(ConvertFrom-Json:String) [], Co \r\n   mmandNotFoundException\r\n    + 
FullyQualifiedErrorId : CommandNotFoundException\r\n \r\nThe term 
'ConvertTo-Json' is not recognized as the name of a cmdlet, function, 
\r\nscript file, or operable program. Check the spelling of the name, or if a 
path \r\nwas included, verify that the path is correct and try again.\r\nAt 
C:\\Users\\coremedia\\AppData\\Local\\Temp\\ansible-tmp-1424263716.9-1357614051035\r\n00\\win_ping.ps1:85
 char:31\r\n+     echo $obj | ConvertTo-Json <<<<  -Depth 99\r\n    + 
CategoryInfo          : ObjectNotFound: (ConvertTo-Json:String) [], Comm \r\n   
andNotFoundException\r\n    + FullyQualifiedErrorId : 
CommandNotFoundException\r\n \r\n", 
"parsed": false

}

The windows machine has Powershell 4 installed.

Any Ideas?

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cfb984d8-5737-4372-894f-1986e155a234%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to