The first example pipes the Get-Process command output to Out-DataTableView (aliased to odv) and the properties Name, Company and Handles are selected.
If you don’t specify any properties, Out-DataTableView will inspect and display all the properties of the piped output.
Get-Process | odv Name, Company, Handles
JQuery DataTables is very customizable. It has numerous options and styled with CSS.
Searching the Results
Type the letter g in the search box to search all columns that contain that letter. The list subsets as you type.
Works with any PowerShell Output
Get-Service | odv Status, ServiceType, Name
Type int in the search box:
Currently, Out-DataTableView code-gens an HTML page and saves it to disk. This means it has to process all the output piped to it before it can be viewed in the browser. The data is converted to an HTML Table, headers and all, plus adds the style sheets, script tags and the initial JQuery code to instantiate and load the JQuery Datatables.
- Download and unzip the PowerShell code to a directory.
- Change to that directory
- Do an Import-Module .\OutDataTableView
This is a fun experiment. I am looking for ways to stream the data directly to the browser bypassing the file creation step. Suggestions are welcome.