Modify psake to support optionally retrying tasks a configurable number of times on failure so transient errors can be handled gracefully.

Usage:

task MyTask -maxRetries 3 { ... }