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