PowerShell "Get-Command | Out-GridView" next steps?
Posted on 2011-05-05
When I run the powershell command:
PS> get-command | out-gridview
I get a nice graphical window pop up that has everything neatly formatted that I can scroll through and read about each command. I want this nice and neat detailed information in Excel so I can change fonts, print it, use other formatting, etc. I've been trying to find this solution all day, but cannot. I'm new to PowerShell, so I don't know what I need to do to get this information into Excel so I can "do stuff" with it there. I've tried some things like:
PS> get-command | format-list * | Export-csv output.csv
PS> get-command | format-list * | Out-File output.txt
I was not able to utilize either one to get all of the data nicely formatted like it is in GridView. Excel 2003 kept combining things wrong and it was a mess. ><
How do I get the output from "Get-Command | Out-GridView" into another application so I can "do more stuff" with it? (print, format, sort, etc.) I'm going to need to know how to do that because I plan to use PowerShell to pull a lot of different kind of information in our system and be able to put them in sortable, printable, formattable formats (like Excel). Like right now we need to get the information given by:
PS> dir | get-acl | out-gridview
into something more portable like an excel file.