Thursday, June 11th, 2009 by Jeffery Hicks
Because PowerShell is all about the objects, I often point out to beginners to use the Select-Object cmdlet to see all the properties of an object and their values.
get-process powershell | select *
Using Get-Member is helpful to discover property names but sometimes you need to see a value to know which property or properties you really want to work with. That's where my Select-Object suggestion comes in. Unfortunately not every property is defined for every object so you can end up with a lot of empty properties. What I wanted was a way to only display properties for an object that have a value. Here's my solution.  
More »
Tags: Filter, objects, powershell, scripting, select
Posted in Windows PowerShell | Comments Off
Tuesday, March 3rd, 2009 by Jeffery Hicks
In this month's SAPIEN newsletter I offered a PowerShell oneliner to returns usage information for a specified folder. I don't have room in the newsletter to go into detail so here is more in-depth coverage of this oneliner. I'll also have a downlink link at the end.  
More »
Tags: measure-object, Oneliner, OutVariable, powershell, Read-Host, Script, scriptblock, select, Usage
Posted in Windows PowerShell | 2 Comments »
Friday, March 14th, 2008 by Don Jones
There's recently been a big discussion on the PowerShell MVP mailing list about Select-Object and its -first parameter, which instructs it to only keep the…  
More »
Tags: -first, powershell, select, Select-Object
Posted in Windows PowerShell | Comments Off