Fixing bug with stopped state

This commit is contained in:
Chris Hoffman 2014-06-21 22:01:02 -04:00
parent 24ad45c8e6
commit 3a3a285d96

View file

@ -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
}