This project is read-only.


Sep 9, 2013 at 8:35 AM
Edited Sep 9, 2013 at 12:22 PM
Hi Kendal,

I have started understanding the code you have written and implement in our environment, I am novice at PowerShell.. can you please explain about the code in ValidatePattern?
  1. (?:(?:
  2. ^
  3. | - I know this pipe acts as a where in PowerShell, how about here?
  4. ?).
  5. automatic$ - if anything starts with $, it is variable, what if ends with $?
Thanks for sharing this wonderful thing to all of us.
Sep 12, 2013 at 9:50 PM
Hi RD,
If you look closely you'll notice that the entire string in ValidatePattern() is surrounded by single quotes - that makes it a literal string...specifically, it's a regular expression for validating that either an IP address or the words "auto" or "automatic" were passed as a value for that parameter.

You can read more about how ValidatePattern works at and

Hope this helps!