Tag Archives: Select-Object

Friday Fun Get Content Words

Recently I was tracking down a bug in script for a client. The problem turned out to be a simple typo. I could have easily avoided that by using Set-StrictMode, which I do now, but that’s not what this is … Continue reading

Posted in Friday Fun, PowerShell v2.0, Scripting | Tagged , , , , , | Leave a comment

Select Object Properties with Values

Here’s another concept I know I’ve written about in the past but that needed an update. A common technique I use when exploring and discovering objects is to pipe the object to Select-Object specifying all properties, get-service spooler | select … Continue reading

Posted in PowerShell v2.0, Scripting | Tagged , , , , , | Comments Off

ByValue, I Think He’s Got It

Recently I responded to an email from a student seeking clarification about the difference between ByValue and ByProperty when it comes to parameter binding. This is what makes pipelined expressions work in Windows PowerShell. When you look at cmdlet help, … Continue reading

Posted in Best Practices, PowerShell | Tagged , , , , , | 1 Comment

Get Properties with Values

One of my nuisance issues when using WMI with Windows PowerShell, is that when looking at all properties I have to wade though many that have no value. I’d prefer to only view properties that have a populated value. Here’s … Continue reading

Posted in PowerShell, PowerShell v2.0, WMI | Tagged , , , , | Comments Off