![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | PowerShell RC2 - Doc Bug in Getting Started? On page 32 of the Getting Started document that comes with RC2 the fourth piece of code on the page seems not to relate to its preceding text. Doc bug? Andrew Watt MVP |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: PowerShell RC2 - Doc Bug in Getting Started? Thanks Andrew for the information. Can you open bugs for all of these on Connect? Thanks Krishna[MSFT] Windows PowerShell Development Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Andrew Watt [MVP]" <SVGDeveloper@aol.com> wrote in message news:9gnqi2p9pafsm5endqpb3js9vufrv87558@4ax.com... > On page 32 of the Getting Started document that comes with RC2 the > fourth piece of code on the page seems not to relate to its preceding > text. > > Doc bug? > > Andrew Watt MVP |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: PowerShell RC2 - Doc Bug in Getting Started? Hi Andrew, Can you confirm this (qualdfold.rtf)? ---------------------------- Boolean Values and Operators ---------------------------- TRUE: Any number !=0 But: PS C:\> -1 -eq $true False So it should read "Any number > 0" or there's a bug in PS --- FALSE: Any number = 0 How many numbers equal 0? ;-) ------------------- Foreach (Scripting) ------------------- Expression | foreach {BEGIN{} PROCESS{} END{}} But this doesn't work: ls | foreach {BEGIN{} PROCESS{} END{}} It terminates with an error, but why? Sorry, but I don't have a Connect Account. cu Max |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: PowerShell RC2 - Doc Bug in Getting Started? "Maximilian Hänel" wrote: > ------------------- > Foreach (Scripting) > ------------------- > Expression | foreach {BEGIN{} PROCESS{} END{}} > > But this doesn't work: > ls | foreach {BEGIN{} PROCESS{} END{}} > > It terminates with an error, but why? The correct syntax is: ls | foreach -begin {} -process {} -end {} # using ForEach-Object cmdlet ls | &{BEGIN {} PROCESS {} END {}} # processing in new scope ls | .{BEGIN {} PROCESS {} END {}} # processing in current scope The first one should be slowest, the last one should be fastest. -- greetings dreeschkind |
My System Specs![]() |
| | #5 (permalink) |
| Guest | Re: PowerShell RC2 - Doc Bug in Getting Started? Hi dreeschkind, > The correct syntax is: > > ls | foreach -begin {} -process {} -end {} # using ForEach-Object cmdlet > ls | &{BEGIN {} PROCESS {} END {}} # processing in new scope > ls | .{BEGIN {} PROCESS {} END {}} # processing in current scope > > The first one should be slowest, the last one should be fastest. Thanks! Max |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting Started | WindyGeorge | Vista mail | 3 | 05-22-2008 07:53 PM |
| Getting Started | Susan Haggerty | Vista mail | 2 | 01-11-2008 02:40 PM |
| Powershell does not terminate when started VBSCRIPT | ktmd | PowerShell | 1 | 05-14-2007 03:35 PM |
| Can not break ping -t when PowerShell started with runas | RikardN | PowerShell | 4 | 07-05-2006 11:04 AM |
| How to get started? | Martin W. | Vista installation & setup | 0 | 06-11-2006 08:28 AM |