diff --git a/windows/setup.ps1 b/windows/setup.ps1 index 883c2792059..07d32c56f51 100644 --- a/windows/setup.ps1 +++ b/windows/setup.ps1 @@ -34,4 +34,4 @@ Set-Attr $result.ansible_facts "ansible_os_family" "Windows" Set-Attr $result.ansible_facts "ansible_distribution" $osversion.VersionString Set-Attr $result.ansible_facts "ansible_distribution_version" $osversion.Version.ToString() -echo $result | ConvertTo-Json; +Exit-Json $result; diff --git a/windows/slurp.ps1 b/windows/slurp.ps1 index d224539ee63..40bb5eba033 100644 --- a/windows/slurp.ps1 +++ b/windows/slurp.ps1 @@ -44,4 +44,4 @@ $result = New-Object psobject @{ encoding = "base64" }; Set-Attr $result "content" $content; -echo $result | ConvertTo-Json; +Exit-Json $result; diff --git a/windows/win_ping.ps1 b/windows/win_ping.ps1 index 0771ea31259..ec6d530025c 100644 --- a/windows/win_ping.ps1 +++ b/windows/win_ping.ps1 @@ -29,4 +29,4 @@ $result = New-Object psobject @{ changed = $false ping = $data }; -echo $result | ConvertTo-Json; +Exit-Json $result; diff --git a/windows/win_stat.ps1 b/windows/win_stat.ps1 index d7b754a2834..fa5596ec1b7 100644 --- a/windows/win_stat.ps1 +++ b/windows/win_stat.ps1 @@ -61,4 +61,4 @@ If ($get_md5 -and $result.stat.exists -and -not $result.stat.isdir) Set-Attr $result.stat "md5" $path_md5; } -echo $result | ConvertTo-Json; +Exit-Json $result;