PowerShell 5.1
$tblOutput = Invoke-Sqlcmd ... -OutputAs DataTables
Why does Invoke-Sqlcmd return a DataRow type when 1 record is return from database vs DataTable when greater than 1?
I would have expected that it returns DataTable regardless.
$successResults = $tblOutput.where({ $_.Flags -eq 36 -And $_.Result -eq 1 })
Preceding gets an error saying where is not defined on DataRow