diff --git a/lib/ansible/modules/windows/win_file.ps1 b/lib/ansible/modules/windows/win_file.ps1 index f387780123c..958f9f04fcc 100644 --- a/lib/ansible/modules/windows/win_file.ps1 +++ b/lib/ansible/modules/windows/win_file.ps1 @@ -17,6 +17,8 @@ # WANT_JSON # POWERSHELL_COMMON +$ErrorActionPreference = "Stop" + $params = Parse-Args $args # path