Pester icon indicating copy to clipboard operation
Pester copied to clipboard

Installation Pester 4.9.0 gives Certificate error on clean win2019 installation without Skip Publisher Check

Open Henkvdweerdt opened this issue 7 years ago • 4 comments

Used commando Find-Package Pester; Pester 4.9.0 PSGallery

Installation with: Install-Module Pester -Force

PackageManagement\Install-Package : A Microsoft-signed module named 'Pester' with version '3.4.0' that was previously installed conflicts with the new module 'Pester' from publisher 'CN=DigiCert Assured ID Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US' with version '4.9.0'. Installing the new module may result in system instability. If you still want to install or update, use -SkipPublisherCheck parameter. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21

  • ... $null = PackageManagement\Install-Package @PSBoundParameters
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:Ins tallPackage) [Install-Package], Exception
    • FullyQualifiedErrorId : PublishersMismatch,Validate-ModuleAuthenticodeSignature, Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Workaround: Install-Module Pester -Force -SkipPublisherCheck

Henkvdweerdt avatar Oct 22 '19 16:10 Henkvdweerdt

This depends on the version of PowerShellGet module you are using. Could you send the version of that module please?

nohwnd avatar Nov 06 '19 11:11 nohwnd

I'm having the same issue, so I'll try to answer your question. This occurs in PowerShell 5.1 using PowerShellGet ver 1.0.0.1. This does seem to be a problem with the version of PSGet itself, as installing Pester using PowerShell 7.0.0-preview5 and PowerShellGet 2.2.1 on the same system works just fine.

Following the instructions to update PowerShellGet in PowerShell 5.1 resolves this error.

devnulljason avatar Dec 11 '19 17:12 devnulljason

Thx. Yes upgrading PowerShellGet is indeed the way to fix this.

nohwnd avatar Dec 13 '19 19:12 nohwnd

The below command works for me,

Install-Module -Name Pester -Force -SkipPublisherCheck

MadhudeepaBhat avatar Jun 19 '20 10:06 MadhudeepaBhat