Skip to content

Commit

Permalink
Check for running instead of status
Browse files Browse the repository at this point in the history
  • Loading branch information
SQLDBAWithABeard committed May 4, 2018
1 parent 76eb0dd commit deec6a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions functions/Watch-DbaXESession.ps1
Expand Up @@ -85,8 +85,7 @@ function Watch-DbaXESession {
}

if ($InputObject) {
$status = $InputObject.Status
if ($status -ne "Running") {
if (-Not $InputObject.IsRunning) {
Stop-Function -Message "$($InputObject.Name) is in a $status state."
return
}
Expand Down

0 comments on commit deec6a5

Please sign in to comment.