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 ...
If we change the value of $class, we can re-run the Get-WMIObject command without editing. This helps a little bit towards efficiency, but PowerShell 3.0 will take ...