PnP-PowerShell Module Install – Authenticode Issuer Mismatch

Problem

I am receiving the publisher check error when I try to install SharePoint Online PnP PowerShell module from PowerShell window using below command.

Install-Module SharePointPnPPowerShellOnline

Error message:

Install-Module SharePointPnPPowerShellOnline -Force
PackageManagementInstall-Package : Authenticode issuer 'CN=Microsoft Root Certificate Authority 2011, O=Microsoft
Corporation, L=Redmond, S=Washington, C=US' of the new module 'SharePointPnPPowerShellOnline' with version
'2.21.1712.2' is not matching with the authenticode issuer 'CN=thawte Primary Root CA, OU="(c) 2006 thawte, Inc. - For
authorized use only", OU=Certification Services Division, O="thawte, Inc.", C=US' of the previously-installed module
'SharePointPnPPowerShellOnline' with version '2.20.1711.0'. If you still want to install or update, use
-SkipPublisherCheck parameter.
At C:Program FilesWindowsPowerShellModulesPowerShellGet1.0.0.1PSModule.psm1:1809 char:21
+ ...          $null = PackageManagementInstall-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
   Exception
    + FullyQualifiedErrorId : AuthenticodeIssuerMismatch,Validate-ModuleAuthenticodeSignature,Microsoft.PowerShell.Pac
   kageManagement.Cmdlets.InstallPackage

Cause

I have searched through Google and I see some people receiving the same error while update PnP PowerShell using the command “Update-Module SharePointPnPPowerShell*” and the cause of error is due to new signing certificates where used in latest setup.

Solution

I have fixed this problem by setting the parameter SkipPublisherCheck as AllowClobber.

Install-Module SharePointPnPPowerShellOnline -SkipPublisherCheck -AllowClobber

-or-

Install-Module SharePointPnPPowerShellOnline -SkipPublisherCheck -AllowClobber -Force

Complete PowerShell Console log:

PnP-PowerShell  Module Install Error Authenticode Issuer Mismatch
Advertisement

Leave a Comment