From 0eccbd9ba2d560f1634f8b4413032d386ce404a3 Mon Sep 17 00:00:00 2001 From: NeverUsedID Date: Wed, 4 Mar 2020 15:18:13 +0100 Subject: [PATCH] Fixed: ServiceUser can't be changed on Server 2008 Added a space to fix sc.exe not changing user on Windows Server 2008 because it expects a space between 'password=' and '"{2}"' --- lib/core/icingaagent/setters/Set-IcingaAgentServiceUser.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/icingaagent/setters/Set-IcingaAgentServiceUser.psm1 b/lib/core/icingaagent/setters/Set-IcingaAgentServiceUser.psm1 index b105821..5c1ef0b 100644 --- a/lib/core/icingaagent/setters/Set-IcingaAgentServiceUser.psm1 +++ b/lib/core/icingaagent/setters/Set-IcingaAgentServiceUser.psm1 @@ -16,7 +16,7 @@ function Set-IcingaAgentServiceUser() $User = [string]::Format('.\{0}', $User); } - $ArgString = 'config {0} obj= "{1}" password="{2}"'; + $ArgString = 'config {0} obj= "{1}" password= "{2}"'; if($null -eq $Password) { $ArgString = 'config {0} obj= "{1}"{2}'; }