$sql=("select top 1 * FROM CollectionProfile")
$CollectionProfile = New-Object System.Data.DataTable
$CollectionProfile = Invoke-Sqlcmd -ServerInstance $Instance -Database $db -Query $sql -ErrorAction Stop
$CollectionProfile.Rows.Count
RETURNS :0
But if I change the TOP count to 2 -
$sql=("select top 2 * FROM CollectionProfile")
RETURNS :2
Driving me crazy and yes, I could not find a single reference to this on the "innernets". I must be doing something wrong, but WHAT?