A few examples from search-lineuri

It’s about time to give a few examples of our scripts, and I thought I’d start out with a few basics from the search-linerui script.

I have tried to create an accurate help description with in the script, so everything should be explained with the use of  “get-help .\search-lineuri.ps1 -Detailed” but here are a few pointers with screenshots as well.

One of the errors I see when other use the script is when the run it without any parameters. When the script was first created it did not require any parameters, but in order to do all the things I want to with it I had to make parameters mandatory. If you run the script without any valid parameters, you should receive the following custom error prompt:

search-ex1

Try run the script with at least one parameter like “-search” to get a result:

search-ex2

Please observe I have set a validation on the number parameter ($URIsearch) at least 2 digits and maximum 20 digits long ([ValidateLength(2,20)]). It will cause a system error if a search is tried with fewer or longer extensions:

search-ex3

That’s all for now. I will post more screen shots and usage examples in the following weeks

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s