How to get powershell object properties in the same order that format-list does?

前端 未结 1 1934
[愿得一人]
[愿得一人] 2021-02-15 18:51

I\'m writing some reporting scripts in Powershell and collecting up a summary table of items as a blank object with additional properties added one by one:

$cmCl         


        
1条回答
  •  盖世英雄少女心
    2021-02-15 19:26

    Try this:

    $fields = $list[0].psobject.properties | select name
    

    0 讨论(0)
提交回复
热议问题