Set-PsBreakPointLastErro by Lee Holmes 17 months ago
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/2221"></script>download | new post
From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes
- Set-StrictMode -Version Latest
- $lastError = $error[0]
- Set-PsBreakpoint $lastError.InvocationInfo.ScriptName `
- $lastError.InvocationInfo.ScriptLineNumber
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
PowerShell Code Repository