Thursday, 21 December 2017

PnP-PowerShell Module Install - Authenticode Issuer Mismatch


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
PackageManagement\Install-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 Files\WindowsPowerShell\Modules\PowerShellGet\\PSModule.psm1:1809 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
    + FullyQualifiedErrorId : AuthenticodeIssuerMismatch,Validate-ModuleAuthenticodeSignature,Microsoft.PowerShell.Pac


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.


I have fixed this problem by setting the parameter SkipPublisherCheck as AllowClobber.
Install-Module SharePointPnPPowerShellOnline -SkipPublisherCheck -AllowClobber
Install-Module SharePointPnPPowerShellOnline -SkipPublisherCheck -AllowClobber -Force
Complete PowerShell Console log:
PnP-PowerShell  Module Install Error Authenticode Issuer Mismatch


No comments:

Post a Comment