It's important to start tests with a clean session, especially when writing unit tests and creating mocks. Here's how to run Pester tests in a completely new PowerShell process. Writing unit tests in ...
Pester is an easy-to-use testing framework for PowerShell code. It was originally adopted to be a unit testing framework but can also be adapted to perform integration and acceptance testing as well.