From 483346d94ba95e5639e06865eb0a4ab49a0e8c44 Mon Sep 17 00:00:00 2001 From: Wil Tan Date: Mon, 3 Jul 2017 09:06:23 +1000 Subject: [PATCH] Fix win_nssm credentials quoting (#26226) (#26228) Quote password to avoid Powershell special characters being interpreted. --- lib/ansible/modules/windows/win_nssm.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/windows/win_nssm.ps1 b/lib/ansible/modules/windows/win_nssm.ps1 index 89ebc7e4bf..baa026eb6d 100644 --- a/lib/ansible/modules/windows/win_nssm.ps1 +++ b/lib/ansible/modules/windows/win_nssm.ps1 @@ -428,7 +428,7 @@ Function Nssm-Update-Credentials } If ($results -ne $fullUser) { - $cmd = "set ""$name"" ObjectName $fullUser $password" + $cmd = "set ""$name"" ObjectName $fullUser '$password'" $results = Nssm-Invoke $cmd if ($LastExitCode -ne 0)