The PowerShell try-catch block is based on C# in that you try something and if a .NET exception is raised you can manage it in the catch block.
To that end minimising the number statements within your try block enables your catch block to specific in its exception handling
↧
Reply To: Powershell script designing
↧