PowerShell Try/Catch retry loop re-executes a write command — how to keep retries idempotent?
I am designing a retry wrapper in PowerShell (assume 7.x) around a command that writes data, using Try/Catch with -ErrorAction Stop so a transient failure lands in a single catch block. The concern is that a retry re-issues the same write, and I have no guarantee the first attempt actually failed before the error was raised — the write may have partially suc