<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Filter PowerShell Output with the Out-Gridview Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/02/25/filter-powershell-output-with-the-out-gridview-cmdlet.aspx</link><description>Summary : The Scripting Wife learns how to filter output by using the Windows PowerShell Out-Gridview cmdlet. 
 I am happily anticipating this weekend in Seattle. I leave for Seattle tomorrow evening. I will be participating in a portion of the MVP summit</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Filter PowerShell Output with the Out-Gridview Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/02/25/filter-powershell-output-with-the-out-gridview-cmdlet.aspx#3570197</link><pubDate>Wed, 01 May 2013 16:00:56 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3570197</guid><dc:creator>jrv</dc:creator><description>&lt;p&gt;@szilard - issue is with PowerShell V2 and V3. &amp;nbsp;Windows 8 has V3 and a newer and fancier grid. This article was written for V2 on Windows 7 or earlier which has the older grid.&lt;/p&gt;
&lt;p&gt;No matter how I do this on V2 it sorts correctly. &amp;nbsp;On V3 the column is now a string so it cannot be sorted correctly and it cannot be matched correctly and teh drop down will not show equla/greater/less because it is seen as NaN.&lt;/p&gt;
&lt;p&gt;My answer was to use the select to get the real column and then you will have all numbers.&lt;/p&gt;
&lt;p&gt;SO you are correct in what you posted. &amp;nbsp;I posted to say that thisis handled differntly in QWIndos 8 and in all systems running V3 because the fields are now strings.&lt;/p&gt;
&lt;p&gt;You can edit the formatter file and chhage this back to the V2 behavior and you might post it on &amp;#39;connect&amp;#39; as a possible bug. &amp;nbsp;Format files can be dynamically loaded as needed to specify alternate default behaviors for compatibility with older scripts. (Blog article needed here!)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3570197" width="1" height="1"&gt;</description></item><item><title>re: Filter PowerShell Output with the Out-Gridview Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/02/25/filter-powershell-output-with-the-out-gridview-cmdlet.aspx#3570177</link><pubDate>Wed, 01 May 2013 14:42:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3570177</guid><dc:creator>szilard</dc:creator><description>&lt;p&gt;@jrv,&lt;/p&gt;
&lt;p&gt;so then, how do you produce the screenshot above:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.technet.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-18-metablogapi/5684.HSG_2D00_2_2D00_25_2D00_11_2D00_06_5F00_thumb_5F00_7AC35438.jpg"&gt;blogs.technet.com/.../5684.HSG_2D00_2_2D00_25_2D00_11_2D00_06_5F00_thumb_5F00_7AC35438.jpg&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3570177" width="1" height="1"&gt;</description></item><item><title>re: Filter PowerShell Output with the Out-Gridview Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/02/25/filter-powershell-output-with-the-out-gridview-cmdlet.aspx#3561185</link><pubDate>Tue, 26 Mar 2013 21:13:07 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3561185</guid><dc:creator>jrv</dc:creator><description>&lt;p&gt;@szillard&lt;/p&gt;
&lt;p&gt;If you inspect all of the properties carefully you will see that all of the alias properties are strings. &amp;nbsp;IF we do a select * we get only the numeric properties. &amp;nbsp;Look at the headers.&lt;/p&gt;
&lt;p&gt;With one we get &amp;nbsp;header for WS &amp;quot;WS(K)&amp;quot; which I an alias that has been converted to (K) by the formatter. &amp;nbsp;With the other we get just WS which is the original unconverted number. &lt;/p&gt;
&lt;p&gt;To see how this is done look into the format files.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3561185" width="1" height="1"&gt;</description></item><item><title>re: Filter PowerShell Output with the Out-Gridview Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/02/25/filter-powershell-output-with-the-out-gridview-cmdlet.aspx#3561178</link><pubDate>Tue, 26 Mar 2013 20:40:44 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3561178</guid><dc:creator>Szilard</dc:creator><description>&lt;p&gt;It is not all lost:&lt;/p&gt;
&lt;p&gt;if I do :&lt;/p&gt;
&lt;p&gt;Get-Process | Select-Object -Property * | Out-GridView&lt;/p&gt;
&lt;p&gt;or specify the properties one by one&lt;/p&gt;
&lt;p&gt;instead of &lt;/p&gt;
&lt;p&gt;Get-Process | Out-GridView&lt;/p&gt;
&lt;p&gt;then everything works properly. All Integers are sorted as such.&lt;/p&gt;
&lt;p&gt;I checked with other people running win 8, and it seems they can not reproduce the example in this article either. WS(K) is simply handled as a string (unless they use Select-object-property) and so it can be sorted alphabetically only, the &amp;quot;less than or equal&amp;quot; option is not available only options like &amp;quot;contains&amp;quot; and such.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3561178" width="1" height="1"&gt;</description></item><item><title>re: Filter PowerShell Output with the Out-Gridview Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/02/25/filter-powershell-output-with-the-out-gridview-cmdlet.aspx#3560470</link><pubDate>Fri, 22 Mar 2013 18:37:11 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3560470</guid><dc:creator>Bokros</dc:creator><description>&lt;p&gt;So could you explain me why Out-GridView sorts VM(M), WS(K), PM(K) and NPM(K) as if they were strings not int values?&lt;/p&gt;
&lt;p&gt;When I sort them I don&amp;#39;t want to see them in alphabetical order.&lt;/p&gt;
&lt;p&gt;It absoluetly does not make sense to sort PM(K) as 1060, 107300, 1084,108432, 175, etc...&lt;/p&gt;
&lt;p&gt;I would think it is also wrong that the example you mentioned plain fails, there is no &amp;quot; is less than or equal to&amp;quot; to the WS(K) criteria, only &amp;quot;equals&amp;quot;, &amp;quot;does not equal&amp;quot; and some other string related criteria. &lt;/p&gt;
&lt;p&gt;Is there some kind of configuration that enables Out-GridView to recognize integers? I mean in case it is not the Handles criteria, because for some reason the values of &amp;quot;Handles&amp;quot; is handled as integers. There must be a completely reasonable explanation for this. I can&amp;#39;t wait to read it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3560470" width="1" height="1"&gt;</description></item><item><title>re: Filter PowerShell Output with the Out-Gridview Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/02/25/filter-powershell-output-with-the-out-gridview-cmdlet.aspx#3560227</link><pubDate>Thu, 21 Mar 2013 16:49:07 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3560227</guid><dc:creator>Szilard</dc:creator><description>&lt;p&gt;On my version less-than-or-equal and greater-than-or-equal is not an option any more, the options I see are the exact same as they are for the CPU(s) and other strings. It is like it handles the values as if they were strings not numbers. The default value is contains. And it is the same for each criteria.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3560227" width="1" height="1"&gt;</description></item><item><title>re: Filter PowerShell Output with the Out-Gridview Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/02/25/filter-powershell-output-with-the-out-gridview-cmdlet.aspx#3390388</link><pubDate>Sat, 26 Feb 2011 02:06:34 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3390388</guid><dc:creator>Chris F</dc:creator><description>&lt;p&gt;Anyway you can bottle this up and put it on Youtube ? This was hilarious and educational at the same time :) ...&lt;/p&gt;
&lt;p&gt;Awesome...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3390388" width="1" height="1"&gt;</description></item></channel></rss>