Windows PowerShell 3.0 Step by Step - Cdn.oreilly.com - O'Reilly
Windows PowerShell 3.0 Step by Step - Cdn.oreilly.com - O'Reilly
Windows PowerShell 3.0 Step by Step - Cdn.oreilly.com - O'Reilly
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
xvi Contents<br />
Chapter 19 Handling Errors 501<br />
Handling missing parameters .....................................501<br />
Creating a default value for a parameter ......................502<br />
Making the parameter mandatory ...........................503<br />
Limiting choices .................................................504<br />
Using PromptForChoice to limit selections ....................504<br />
Using Test-Connection to identify <strong>com</strong>puter connectivity .......506<br />
Using the -contains operator to examine contents of an array ...507<br />
Using the -contains operator to test for properties .............509<br />
Handling missing rights .........................................512<br />
Attempt and fail ...........................................512<br />
Checking for rights and exiting gracefully .....................513<br />
Handling missing WMI providers ..................................513<br />
Incorrect data types .............................................523<br />
Out-of-bounds errors ............................................526<br />
Using a boundary-checking function .........................526<br />
Placing limits on the parameter ..............................528<br />
Using Try...Catch...Finally ........................................529<br />
Catching multiple errors ....................................532<br />
Using PromptForChoice to limit selections: <strong>Step</strong>-<strong>by</strong>-step exercises .....534<br />
Chapter 19 quick reference ......................................537<br />
Chapter 20 Managing Exchange Server 539<br />
Exploring the Exchange 2010 cmdlets .............................539<br />
Working with remote Exchange servers ............................540<br />
Configuring recipient settings ................................... 544<br />
Creating the user and the mailbox .......................... 544<br />
Reporting user settings .....................................548<br />
Managing storage settings .......................................550<br />
Examining the mailbox database ............................550<br />
Managing the mailbox database .............................551