I'm trying to run Pester tests on a Windows 7 machine. I followed the instructions from here, and I also installed PSGet and executed Install-Module Pester
.
This works on both the Windows 7 machines I have. I can run the pester tests from an elevated PowerShell console.
I have a .cmd file which runs the Pester tests, but I'm unable to run it from an elevated command prompt. This works on one Windows 7 machine, but it doesn't work on another one.
I followed the same instructions to install Pester on both the machines. Please suggest what I might be missing.
On the machine that 'doesn't work':
When I run the Pester script from PowerShell, the Invoke-Pester
works and the script runs as expected. But, when I try to run the .cmd file which points to the pester scripts, I get an error saying Invoke-Pester
is not recognized as a cmdlet, function; which means, as far as I understood, Pester is not working from the command prompt.
On the machine that 'works':
I am able to run the Pester script from both PowerShell and command prompt windows. The script runs as expected.