Fixing bug with stopped state
This commit is contained in:
parent
24ad45c8e6
commit
3a3a285d96
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ If ($state) {
|
|||
}
|
||||
Set-Attr $result "changed" $true;
|
||||
}
|
||||
ElseIf ($state -eq "stopped" -and $svcName -ne "Stopped") {
|
||||
ElseIf ($state -eq "stopped" -and $svc.Status -ne "Stopped") {
|
||||
try {
|
||||
Stop-Service -Name $svcName -ErrorAction Stop
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue