【发布时间】:2015-02-23 06:07:04
【问题描述】:
我正在使用 linux 上托管的 ansible 来管理 azure 上的 linux 和 Windows 虚拟机。当我尝试使用
从 ansible ping windows VM# ansible windows -m win_ping
我遇到以下错误:
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
}
windows 机器安装了 Powershell 4。
有什么想法吗?
【问题讨论】:
-
您是否打开了必要的端口?
标签: linux powershell azure ansible