Skip to content

Commit

Permalink
Test-DbaMaxDop returns duplicate results
Browse files Browse the repository at this point in the history
Moved the Select-DefaultView to the end {} block!
If we pass 2 instances at once the 1st instance was being returned twice.
If we pass 3 then...3..etc.
  • Loading branch information
ClaudioESSilva committed Dec 11, 2017
1 parent 36f4895 commit e6dbd69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions/Test-DbaMaxDop.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ function Test-DbaMaxDop {
}
}
}
Select-DefaultView -InputObject $collection -Property ComputerName, InstanceName, SqlInstance, Database, DatabaseMaxDop, CurrentInstanceMaxDop, RecommendedMaxDop, Notes
}
}
end {
Select-DefaultView -InputObject $collection -Property ComputerName, InstanceName, SqlInstance, Database, DatabaseMaxDop, CurrentInstanceMaxDop, RecommendedMaxDop, Notes
}
}

0 comments on commit e6dbd69

Please sign in to comment.