Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBook
Script Library
Twitter Grid
Featured Posts
Directory
Dreaming in PowerShell
Code MarkUp Tool
All Tags
»
PowerShell V2
»
Error handling
»
catch
»
try
(
RSS
)
Browse Blog Posts by Tags
Showing related tags and posts for the
Blogs
application. See
all tags in the site
finally
scripts
Catch-Error.ps1
# Requires -Version 2 # Show-TryCatchFinally.ps1 # Demonstrates try/catch/finally in V2 # First, try something that will work Try { $I = 1 } Catch { " Caught a problem in try 1 " } Finally { " All done with 1st try " } # Now try something that fails $one = 1 # $zero=0 Try { $one ...
Posted to
Thomas Lee's PowerShell Scripts
by
PowerShell Scripts
on 11-23-2008
Filed under:
Filed under:
scripts
,
PowerShell V2
,
try
,
finally
,
error handling
,
catch
Page 1 of 1 (1 items)
Copyright 2011 PowerShell.com. All rights reserved.