From 59a65b42f95c66c008045d9ffb271d364c47b55c Mon Sep 17 00:00:00 2001 From: Tom Willwerth Date: Sat, 9 Feb 2019 11:03:14 -0500 Subject: [PATCH] updating Invoke-DbaDbUpgrade for #5047 this fixes #5047 by checking if each object is in the array instead of containing the array. Also applied to the ExcludeDatabase option --- functions/Invoke-DbaDbUpgrade.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/Invoke-DbaDbUpgrade.ps1 b/functions/Invoke-DbaDbUpgrade.ps1 index 8287fad7eb..01e5d391e3 100644 --- a/functions/Invoke-DbaDbUpgrade.ps1 +++ b/functions/Invoke-DbaDbUpgrade.ps1 @@ -134,10 +134,10 @@ function Invoke-DbaDbUpgrade { $InputObject = $InputObject | Where-Object { $_.IsSystemObject -eq $false } if ($Database) { - $InputObject = $InputObject | Where-Object { $_.Name -contains $Database } + $InputObject = $InputObject | Where-Object Name -In $Database } if ($ExcludeDatabase) { - $InputObject = $InputObject | Where-Object { $_.Name -notcontains $ExcludeDatabase } + $InputObject = $InputObject | Where-Object Name -NotIn $ExcludeDatabase } foreach ($db in $InputObject) {