mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Add restart functionality
This commit is contained in:
committed by
Matt Martz
parent
ab8f7289b0
commit
10a526e020
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user