Add restart functionality

This commit is contained in:
Paul Durivage 2014-06-19 12:17:38 -05:00 committed by Matt Martz
parent ab8f7289b0
commit 10a526e020

View file

@ -50,7 +50,12 @@ If ($params.restart) {
If ($state -eq "present") { If ($state -eq "present") {
try { try {
$result = Add-WindowsFeature -Name $name if ($restart) {
$featureresult = Add-WindowsFeature -Name $name -Restart
}
else {
$featureresult = Add-WindowsFeature -Name $name
}
} }
catch { catch {
Fail-Json $result $_.Exception.Message Fail-Json $result $_.Exception.Message