![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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 script files I'm having problems understanding how Powershell deals with script inside a .ps1 file. It appears there are at least 3 "script blocks" (begin, process and end) but the use of these isn't clear. It would also seem desirable to use a function or method in a pipeline (or maybe locally defined cmdlets). I have been able to use functions in a procedural manner but it's not obvious how to extend this to pipelining. Where would I find documentation on Powershell scripting and files that would help me with this? Thanks Mike |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Powershell script files Take a look at Beginning PowerShell Guide. Specifically the function section. the Begin/Process/End work exactly the same. http://www.codeplex.com/PsObject/Wik...ringTitle=Home Defined functions at top or in the Begin Section of the Script. Functions have to be defined before they are called. Also.. you may want to check out: http://bsonposh.com/modules/wordpress/?p=23 (Birth of Script/Function) "Mike Blake-Knox" <mikebk@nospam.nospam> wrote in message news:VA.000000ae.22c40f48@nospam.nospam... > I'm having problems understanding how Powershell deals with script > inside a .ps1 file. It appears there are at least 3 "script blocks" > (begin, process and end) but the use of these isn't clear. It would > also seem desirable to use a function or method in a pipeline (or maybe > locally defined cmdlets). I have been able to use functions in a > procedural manner but it's not obvious how to extend this to > pipelining. > > Where would I find documentation on Powershell scripting and files that > would help me with this? > > Thanks > > Mike > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Powershell script help | Tboz | PowerShell | 3 | 08-01-2008 08:58 AM |
| What is the MIME type of Windows Powershell script files (.ps1 fil | zkyboy | PowerShell | 3 | 03-11-2008 07:37 AM |
| Powershell script to keep a weeks worth of backup files | TJ | PowerShell | 4 | 02-29-2008 03:57 AM |
| when run powershell script as windows service ,powershell fail | powershell fail on winodws 2008 | PowerShell | 6 | 01-15-2008 03:20 PM |
| Is there an equivalent in powershell to get the name of the script | Bob Landau | PowerShell | 9 | 09-10-2007 07:34 PM |