From 10a526e020f09234d65c03a5289548f049b6f357 Mon Sep 17 00:00:00 2001 From: Paul Durivage Date: Thu, 19 Jun 2014 12:17:38 -0500 Subject: [PATCH] Add restart functionality --- library/windows/win_feature.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/windows/win_feature.ps1 b/library/windows/win_feature.ps1 index cc626668f08..0808aafe248 100644 --- a/library/windows/win_feature.ps1 +++ b/library/windows/win_feature.ps1 @@ -50,7 +50,12 @@ If ($params.restart) { If ($state -eq "present") { try { - $result = Add-WindowsFeature -Name $name + if ($restart) { + $featureresult = Add-WindowsFeature -Name $name -Restart + } + else { + $featureresult = Add-WindowsFeature -Name $name + } } catch { Fail-Json $result $_.Exception.Message