diff --git a/lib/ansible/modules/windows/win_get_url.ps1 b/lib/ansible/modules/windows/win_get_url.ps1 index e5e1ea73c83..23463b681c0 100644 --- a/lib/ansible/modules/windows/win_get_url.ps1 +++ b/lib/ansible/modules/windows/win_get_url.ps1 @@ -62,7 +62,7 @@ Else { $stream = New-Object System.IO.StreamReader($response.GetResponseStream()) - $stream.ReadToEnd() | Set-Content -Path $dest -Force + $stream.ReadToEnd() | Set-Content -Path $dest -Force -ErrorAction Stop $result.changed = $true }