Commit 1c2d2449 by Chris Hoffman

Fixing bug with stopped state

parent 844e9009
...@@ -68,7 +68,7 @@ If ($state) { ...@@ -68,7 +68,7 @@ If ($state) {
} }
Set-Attr $result "changed" $true; Set-Attr $result "changed" $true;
} }
ElseIf ($state -eq "stopped" -and $svcName -ne "Stopped") { ElseIf ($state -eq "stopped" -and $svc.Status -ne "Stopped") {
try { try {
Stop-Service -Name $svcName -ErrorAction Stop Stop-Service -Name $svcName -ErrorAction Stop
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment