Add restart functionality
This commit is contained in:
parent
ab8f7289b0
commit
10a526e020
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue