PowerShell Great Debate: Capturing Errors
Hot on the heels of our last Great Debate, let’s take the discussion to the next logical step and talk about how you like to capture errors when they occur. The first technique is to use -ErrorVariable: `Try { Get-WmiObject Win32_BIOS -comp nothing -ea stop -ev mine } Catch { use $mine for …
