Huddled Masses
You can do more than breathe for free...
Browse: Home / PowerShell Functions

PowerShell Functions

PowerShell: Determine your function’s position in the pipeline

By Joel 'Jaykul' Bennett on 27-Dec-2009

I just posted an article to the FAQ on the PoshCode Wiki answering this question that came up again on our IRC PowerShell user group today. It came up in the context of determining whether a function was the last function on the pipeline, because one of our users was looking for a way (other [...]

Posted in Huddled | Tagged Debugging, Pipeline, PowerShell, PowerShell Functions | 1 Response

Using Script Functions in the PowerShell Pipeline ( Take Two )

By Joel 'Jaykul' Bennett on 13-Apr-2009

One of the consistent questions about PowerShell is: what’s the best way to write a script or a function to process pipeline objects and be able to take it’s parameters as a normal function? Of scripts and functions The first thing to know is that in PowerShell, there’s really no difference between a script (just [...]

Posted in Huddled | Tagged Advanced Functions, Pipeline, PowerShell, PowerShell Functions

PoshCode Updated for CTP3

By Joel 'Jaykul' Bennett on 24-Dec-2008

I’ve updated the PoshCode script module to support CTP3, and added a -limit parameter to the Get-PoshCode cmdlet so you can specify how many items you want retrieved in the case where there are a lot of matches for your search terms — by default the limit is 25. Improvements to the underlying web search [...]

Posted in Huddled | Tagged Advanced Functions, CTP3, Modules, PoshCode, PowerShell, PowerShell Functions

Pipeline Input vs Parameters in PowerShell scripts

By Joel 'Jaykul' Bennett on 25-Apr-2008

A relatively new PowerShell user came into #PowerShell on IRC.FreeNode.net this week to ask a question about scripts and the pipeline, and the conversation went so well, that I thought I’d share it with you all in case it helps clear things up for you. We’ll call him “user” since he left before I could [...]

Posted in Huddled | Tagged Pipeline, PowerShell, PowerShell Functions

Writing Better Script Functions for the PowerShell Pipeline

By Joel 'Jaykul' Bennett on 25-Oct-2007

I wrote a post last week about how to write functions for use in the PowerShell pipeline and I’ve been using the template I wrote in that post as the basis for several of my other scripts … and I’ve been gradually fleshing it out, and improving it, so I thought I’d drop it here [...]

Posted in Huddled | Tagged Pipeline, PowerShell, PowerShell Functions, Scripting

Using Script Functions in the PowerShell Pipeline

By Joel 'Jaykul' Bennett on 19-Oct-2007

Update, I created a better version of a pipeline function for powershell … Every once in a while the question of how to best use the process block of a function to process pipeline objects comes up on IRC, and although I’m sure others have already written this up on the web in the past, [...]

Posted in Huddled | Tagged Pipeline, PowerShell, PowerShell Functions, Scripting

About_Filter considered Harmful

By Joel 'Jaykul' Bennett on 08-Oct-2007

Someone asked a question in the #PowerShell channel on irc.FreeNode.net today about how to use filters, and pasted this an example like this: filter process-a-m {    $_.processname -like "[a-m]*" } Get-Process | where {process-a-m} The question was: why doesn’t this have any output? Well, the answer is: it can’t have any output. The filter [...]

Posted in Huddled | Tagged Documentation, Filters, PowerShell, PowerShell Functions, Scripting

Lijit Search

Tags

.Net .Net 2008 Scripting Games Automation Bugs Design Development Funny Gadgets GeoShell GUI Huddled Masses Internet licensing Microsoft Modules My Software News Personal PInvoke Pipeline Politics PoshCode PoshConsole PowerBoots PowerShell PowerShell Functions PowerTips Rants Recommender Repository Scripting ShowUI Software Solutions Textile Tips User Group UserInterface WalkThrough WebHosting Windows 7 WordPress WPF Xml

About Huddled Masses

This is web site is dedicated to the musings of Joel Bennett (aka Jaykul) about technology, software, software development, the web, and the world.

Any resemblance of the views expressed and the views of my employer, my terminal, or the view out my window are purely coincidental. The resemblance between them and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader.

P.S.: I occasionally link to things I think are great. When I do, I occasionally find a "referral code" so I can make a little cash. I promise that I don't link to anything just because of that cash (I wouldn't cross the street for the amount of cash those links bring in, never mind write a whole blog post) ... but I do not promise that things I link to will stay great as time passes, nor that you will agree with me about their greatness!

Archives

  • April 2012
  • February 2012
  • January 2012
  • October 2011
  • August 2011
  • July 2011
  • June 2011
  • March 2011
  • February 2011
  • January 2011

Copyright © 2012 Joel Bennett.

Powered by WordPress and Hybrid.