Table sort on dates is always ascending

Product: PowerShell Universal
Version: 1.4.6

PowerShell Universal 4.06

I am retrieving data from a SQL server and I would like it to show the data by date in descending order instead of ascending. It seems the default is always ascending. I don’t see anything in the docs to specify this and I tried several options -DefaultSortColumn and -SortType datetime along with -DisableSortRemove. I even tried modifying my SQL query to use ORDER BY submitted DESC. I noticed if I add the -IncludeInExport to the New-UDTableColumn and include the -Export -ExportOption “csv” to New-UDTable and then export the data it is shown in descending order. Is there an option I am missing to get the result I am looking for?

Just encountered this exact same thing. Did you ever find a solution?


Figured it out a few minutes after I posted… -DefaultSortDirection on the New-UDTable cmdlet.