If you would like the row(s) affected and other statistics displayed as a table instead of a list, and are struggling with the fact that the statistics object is a dictionary, here is how I converted and displayed it with a little help from https://stackoverflow.com/a/18495802/2260616
Note the list of 18 statistics available at https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/provider-statistics-for-sql-server
after calling Invoke-Sqlcmd with -StatisticsVariable "sqlcmd_statistics_dictionary"
$sqlcmd_statistics_object = ($sqlcmd_statistics_dictionary `
| %{New-Object PSObject -Property $_})
Format-Table -InputObject $sqlcmd_statistics_object -AutoSize -Property `
IduCount, IduRows, SelectCount, SelectRows, SumResultSets, `
Transactions, BuffersSent, BytesSent, BuffersReceived, BytesReceived
Format-Table -InputObject $sqlcmd_statistics_object -AutoSize -Property `
ConnectionTime, ExecutionTime, NetworkServerTime, ServerRoundtrips, `
CursorOpens, PreparedExecs, Prepares, UnpreparedExecs
The results will look like: