Pester is compatible with every version of Windows that can run at least PowerShell 2. That includes: Windows 10, 8, 7, Vista, XP, and their respective Server versions 2016, 2012 R2, 2012, 2008 R2, 2008, and 2003.
Windows 10 and Windows Server 2016 make installing and updating PowerShell modules extremely simple by providing
Unfortunately there are some complications specific to Pester that we cannot avoid.
Pester version 3.4.0 ships as part of Windows 10 and Windows server 2016, and that distribution conflicts with the standard module update mechanism.
It is not possible to update the built-in Pester to a newer version, using the
Instead you need to perform a new side-by-side installation of Pester, because
Install-Module detects the current installation of Pester is signed with a different signature than the one you are installing.
Here's the command you need to run as administrator in order to get the latest version of Pester:
-SkipPublisherCheck option is typically required for machines that only have v3.4.0 installed as mentioned above.
That particular version of the module was signed by Microsoft to be shipped in-box, which is not the case for later versions which are community maintained and signed with a different certificate.
Attempting to install the module without that option may fail.
If you receive the following warning when trying to install the module, you may need to explicitly enable TLS 1.2:
To enable TLS 1.2 for the current PowerShell instance, you can run the following code, and then re-run the installation command:
If you need to remove the built-in version of Pester on your machine, you can do so by executing the following code:
For any subsequent update it is enough to run:
The way you can install a new module differs based on the version of PowerShell you are using. Determine the version of PowerShell you are using by running:
In version 5 or newer you can use the built-in
Update-Module cmdlets coming from PowerShellGet.
From an administrative PowerShell command line run:
Or to update:
On PowerShell 3 and 4, there is no default package manager installed, but luckily PowerShellGet is available for installation. See detailed instructions here. When you have the package manager installed, please start a new administrator PowerShell window and use:
Or to update:
To install Pester you don't have to use any package manager.
You can download the sources directly at our release page and copy them to your Module directory.
Your module directory is most likely
C:\Program Files\WindowsPowerShell\Modules\Pester or
C:\Windows\System32\WindowsPowerShell\v1.0\Modules (on older versions of Windows), please refer to
PSGallery is the easiest way to get Pester installed to your computer, but there are alternatives. On a build server you might prefer using Chocolatey, or if you're adding Pester to your .NET project that already uses NuGet, you might prefer using NuGet. These options may not support pre-release versions and it may need to be initialized on first use. For those reasons you might prefer installing from the other available sources.
Chocolatey (or choco) is the easiest way to get Pester running on AppVeyor. You avoid setting up PowerShellGet and it also supports pre-release versions.
Or to update:
You can also pass the
--prerelease option to install or update to a prerelease version of Pester instead.
Nuget is the package manager for .NET projects. Getting Pester from Nuget is useful when you are integrating PowerShell code with your .NET project, and want to have that code tested. To install use Package Manager of Visual Studio, or Package Manager Console in Visual Studio. Once you need this we are pretty sure you know what you are doing. 🙂