Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

about_function doc error

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 12-04-2006   #1 (permalink)
William Stacey [C# MVP]
Guest


 

about_function doc error

The help about_function doc seems mixed up:

"...You can also define parameters in filters. For example, to create a
filter
that returns a list of processes with a certain initial letter, use
a format such as the following:

filter process_1
{
param([string]$first)
$_.processname -like "$first*"
}

When you call the filter, you must specify the first letter as an
argument, as shown in the following example:
Get-Process | where { process_1 c } ..."

This seems to have a few issues. 1) the filter returns bool, not an object
and 2) "where { filter }" is not correct.
I think the intention was this:

filter process_1
{
param([string]$first)
if ($_.processname -like "$first*") {$_}
}

PS c:\> process | process_1 win

--
William Stacey [C# MVP]




My System SpecsSystem Spec
Closed Thread
Update your Vista Drivers Update Your Drivers Now!!

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with windows vista mail, Socket Error: 10053, Error Number: 0x800CCC0F ASM Vista mail 4 03-22-2008 08:03 PM
Canot post to newsgroups Socket Error: 10053, Error Number: 0x800CCC0F ThatsIT.net.au Vista mail 1 03-09-2008 10:23 AM
Canot post to newsgroups Socket Error: 10053, Error Number: 0x800CCC0F ThatsIT.net.au Vista General 0 03-09-2008 08:10 AM
windows live mail 2008 (Build 12.0.1606) error report error gbp007 Windows Live 13 01-23-2008 11:06 PM
Port: 110, Secure(SSL): No, Server Error: 0x800CCC90, Error Number: 0x800CCC18 Jesse Linville Vista mail 1 04-20-2007 06:52 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51