Skip to Content
Windows PowerShell™ 3.0 Step by Step
book

Windows PowerShell™ 3.0 Step by Step

by Ed Wilson
February 2013
Beginner content levelBeginner
704 pages
21h 31m
English
Microsoft Press
Content preview from Windows PowerShell™ 3.0 Step by Step

Chapter 19. Handling Errors

After completing this chapter, you will be able to:

  • Handle missing parameters in scripts.

  • Limit the choices available to users of your scripts.

  • Handle missing rights and permissions in scripts.

  • Handle missing WMI providers in scripts.

  • Use Try...Catch...Finally to catch single and multiple errors in scripts.

When it comes to handling run-time errors in your script, you need to have an understanding of the intended use of the script. For example, just because a script runs once does not mean it will run a second time. Disks fail, networks fail, computers fail, and things are constantly in flux. The way that a script will be used is sometimes called the use-case scenario, and it describes how the user will interact with the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Windows Server™ 2003 Inside Out

Microsoft® Windows Server™ 2003 Inside Out

William R. Stanek
Windows PowerShell® 2.0 Bible

Windows PowerShell® 2.0 Bible

Thomas Lee, Karl Mitschke, Mark E. Schill, Tome Tanasovski

Publisher Resources

ISBN: 9780735669970Purchase book