Open
Description
While manipulating XML data and testing Out-ConsoleGridView
(Powershell 7.0.0 on Windows 10.0.19603), I noticed that the cmdlet appears to demand data of a certain datatype. For testing, a sample XML file can be found here.
[xml]$xml = Get-Content '.\sample.xml'
Tabular output from $xml
can be viewed in the terminal
$xml.catalog.book
Output
id : bk101
author : Gambardella, Matthew
title : XML Developer's Guide
genre : Computer
price : 44.95
publish_date : 2000-10-01
description : An in-depth look at creating applications
with XML.
id : bk102
...
Piping to Out-GridView
produces expected output
$xml.catalog.book | Out-GridView
However, piping to Out-ConsoleGridView
produces an error
$xml.catalog.book | Out-ConsoleGridView