Usage: Place ExponentialBackoff.psm1 file along with your powershell script and pass commands to Exponential Back Off function. using module ".\ExponentialBackoff.psm1" Use-ExponentialBackoff -ScriptBlock { Your script here. }