When you handle errors yourself using Trap or try/catch, you should make sure that you set your ErrorActionPreference to “Stop” or specify -ErrorAction Stop for each cmdlet you want to handle. Otherwise, Cmdlet exceptions would be invisible to your error handlers and handled by PowerShell automatically.
Change ErrorAction for Your Private Error Handling
Categories
- Free tools
- SQL Admin Toolset
- SQL Compliance Manager
- SQL Defrag Manager
- SQL Diagnostic Manager for MySQL
- SQL Diagnostic Manager for SQL Server
- SQL Diagnostic Manager Pro
- SQL Doctor
- SQL Enterprise Job Manager
- SQL Inventory Manager
- SQL Query Tuner for SQL Server
- SQL Safe Backup
- SQL Secure
- SQL Workload Analysis for SQL Server
- Uptime Infrastructure Monitor Formerly Uptime