![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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 | $args.count if ($args.count -lt 4) { write-host "powershell.exe .\filegrp_day.ps1 <directory> <start-date > <end-date> <powergadget template>" break } ====================================== i would like to script to accept only 3 or 4 parameters. The line parameter <powergadget template> is optional. Those <directory> <start-date > <end-date> are mandatory parameters How shld i go about that ? |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is this a bug with @args | RickB | PowerShell | 4 | 04-09-2008 07:58 AM |
| Help with $Args in script | David Kriz | PowerShell | 2 | 02-12-2008 09:00 AM |
| $args | IT Staff | PowerShell | 7 | 01-19-2008 12:18 AM |
| $args in runspace invoke | William Stacey [C# MVP] | PowerShell | 0 | 05-09-2007 11:10 AM |
| ETS: Problem with $args[0] and -is operator | dreeschkind | PowerShell | 5 | 11-28-2006 07:37 AM |