ansible/library/windows/ping.ps1

18 lines
314 B
PowerShell
Raw Normal View History

#!powershell
# WANT_JSON
If ($args.Length -gt 0)
{
$params = Get-Content $args[0] | ConvertFrom-Json;
}
$data = 'pong';
If ($params.data.GetType)
{
$data = $params.data;
}
2014-06-17 22:44:06 +02:00
$result = New-Object psobject;
$result | Add-Member -MemberType NoteProperty -Name ping -Value $data;
echo $result | ConvertTo-Json;