Sorry. I may be an a$$hole, but I have always preferred to give people clues 
than to give them direct answers.

And your solution is very clean. I like it. :) :) :)

-----Original Message-----
From: Ben Scott [mailto:mailvor...@gmail.com] 
Sent: Saturday, April 13, 2013 8:15 PM
To: NT System Admin Issues
Subject: Re: PowerShell - Dependent parameters

On Sat, Apr 13, 2013 at 7:17 PM, Michael B. Smith <mich...@smithcons.com> wrote:
> What you are missing is the DefaultParameterSetName.

  Ahhh... that did it!  Thanks for the clue!

  Finished code, for those so interested:

http://pastebin.com/dQbDDqKN

  It even treats -mailTo as optional when -smtpHost is present (a valid, albeit 
useless, scenario).

> RTFM. :)
>
> Payette, Second Edition, section 8.2.

  My copy of Payette is at work on my desk, and was open during this exercise.  
This is one of those "It's easy to find, if you know the answer" situations.  
:-)

  Thanks again!

-- Ben

~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ 
<http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Reply via email to