1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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") {
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