dbatools
dbatools copied to clipboard
Copy-DbaDbDataTable no longer supports array of tables
Before submitting a bug report:
- [ X] Ensure you are able to reproduce it on the latest released version (we release often)
- [ X] Verified this bug is not already reported in an issue
- [ X] Verified errors are not related to permissions
- [ X] Can reproduce in a clean PowerShell session (clean =
powershell -NoProfile)
The check on 246:
if ($dbTable.Count -eq 1) {
$InputObject += $dbTable
} else {
Write-Message -Level Warning -Message "The table $Table matches $($dbTable.Count) objects. Unable to determine which object to copy"
continue
}
Works for >1 table being piped into the function, but this is what breaks the string array of tables from being provided to the function directly from succeeding.
Steps to Reproduce

Expected Behavior
Each of the 7 tables would be copied from $prodInstance to $uatInstance
Actual Behavior
Error catches this and will not let it proceed
Environmental data
Name Value
PSVersion 5.1.14393.2248 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.14393.2248 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1