How to convert DataTable to JSON using ConvertTo-json in Powershell v3
After playing with a sample datatable a bit, I ended up with this:
($ds.Tables["mytable"] | select $ds.Tables["mytable"].Columns.ColumnName ) | ConvertTo-Json
You can also exclude properties with Select-Object, removing the noise.
$dt | Select-Object * -ExcludeProperty ItemArray, Table, RowError, RowState, HasErrors | ConvertTo-Json