Why Doesn’t My Pipeline Work?

I saw a little discussion thread on Twitter this morning which I felt needed a little more room to explain. Plus since we're in ScriptingGames season beginners might like a few pointers. I always talk about PowerShell, objects and the pipeline. But sometimes what looks like a pipelined expression … Continue reading

Rename Hashtable Key Revised

Last week I posted an advanced PowerShell function to rename a hashtable key. As usual, the more I worked with it the more I realized it was missing something - namely the ability the take a pipelined object. My original version assumed you had saved the hashtable to a variable. But as I was … Continue reading

Pipeline Power

Last week I came across a blog post that had a decent example using PowerShell and PowerCLI to get the disk location for all virtual machines. The posted code works and does display the information you might be after. $myVMs = get-vm foreach($vm in $myVMs){ $myDisks = @($vm | … Continue reading

Have Your Output and Variable Too

There's a relatively useful suggestion floating around on Twitter on how to save results of PowerShell command to a variable and see the results at the same time. PS C:\> ($data=get-process) I'll admit this is a clever technique: you get the results from Get-Process written to the … Continue reading

Friday Fun – Get Ranked Object

Earlier this week on Google Plus, Hal Rottenberg posted a PowerShell idea he had. His goal was to identify a group of objects that would be statistically significant. For example, given a collection of files, group the files by size but ranked by size so that you might have a group for the largest … Continue reading