none
Power Shell Columns from Dataset RRS feed

  • Question

  • I am retrieving an empty dataset using powershell and when displaying I am not able to align column names. 

    If I use $Dataset.Tables.Columns.ColumnName, I am getting below format.

    col1

        col2

        col3.

    Can someone help me how to display in a tabular format. Thanks in advance for your help.

    • Moved by Bill_Stewart Friday, July 27, 2018 8:38 PM Unanswerable drive-by question
    Saturday, May 26, 2018 6:42 AM

All replies

  • $Dataset.Tables.Columns | Format-Table ColumnName

    \_(ツ)_/

    Saturday, May 26, 2018 9:03 AM
  • I used below but values are displayed as list. How can I get it as Table ?

    foreach ($Columns in $Dataset.Tables[1].Columns)
                    {                     
                         $Columns.ColumnName | Format-Table *
                    }

    Saturday, May 26, 2018 7:32 PM
  • $Dataset.Tables[1].Columns | Format-Table ColumnName

    To get the data as a formatted table:

    Dataset.Tables[1] | Format-Table -Auto


    \_(ツ)_/



    • Edited by jrv Saturday, May 26, 2018 7:38 PM
    Saturday, May 26, 2018 7:37 PM