-
-
Notifications
You must be signed in to change notification settings - Fork 476
Installation and Update
Pester is compatible with every version of Windows that can run at least PowerShell 2. That is 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 Install-Module
and Update-Module
cmdlets. 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 newer version, using the Update-Module
cmdlet.
Instead you need to perform a new side-by-side installation of Pester. You are also required to skip publisher check, and force the installation, 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:
Install-Module -Name Pester -Force -SkipPublisherCheck
For any subsequent update it is enough to run:
Update-Module -Name Pester
The way you can install a new module differs based on the version of PowerShell you are using. See what version of PowerShell is installed on your computer by running:
"$($PSVersionTable.PSVersion)"
In version 5 or later you can use the built-in Install-Module
and Update-Module` cmdlets coming from PowerShellGet.
From administrator PowerShell command line run:
Install-Module -Name Pester
Or to update:
Update-Module -Name Pester
Install PowerShell get?
Install PSGet?
Install PSGet ?