Difference between revisions of "Power Shell"

Jump to navigation Jump to search
251 bytes added ,  08:13, 23 December 2009
m
Added "Exceptions and Error Handling"
m (Added "Variables")
m (Added "Exceptions and Error Handling")
Line 201: Line 201:
Write-Host $Rows " inserted into database"  
Write-Host $Rows " inserted into database"  
</pre>
</pre>
== Exceptions and Error Handling ==
* http://huddledmasses.org/trap-exception-in-powershell/
If you know where the error is likely to occur, then just place an error catcher immediately after it...
<pre>
if (-not $?) {
    # Handle error here
  }




Navigation menu