I recently saw a post by Jakub Jares on testing self-contained scripts with Pester. He suggests, essentially, hijacking the call to any functions, dot-sourcing the script, and then removing the hijack (an alias, in this case). We do something similar at work to test Azure runbooks - containing all actual