PnP PowerShell Upgrade Error – “Authenticode issuer” certificate invalid

With the December 2017 release SharePoint PnP PowerShell, if you update the PnP PowerShell commendlets using “Update-Module” via PowerShell, you might receive the following error.

1
2
3
4
5
6
7
8
9
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\1.0.0.1\PSModule.psm1:2089 char:20
+ ...           $sid = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
    + FullyQualifiedErrorId : AuthenticodeIssuerMismatch,Validate-ModuleAuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

What Happened?

Real simple here, with the December 2017 release, new signing certificates where used, so we cannot simply “update”, rather we need to uninstall and re-install.

  1. Open PowerShell as an admininistrator.
  2. *Optional: Check to see what PnP module(s) may be installed.
    1
    Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version –Descending
  3. Uninstall PnP PowerShell
    1
    Uninstall-Module SharePointPnPPowerShellOnline
  4. *Optional: Check again to verify that the module(s) have been removed
    1
    Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version –Descending
  5. Install the latest version of PnP PowerShell
    1
    Install-Module SharePointPnPPowerShellOnline

You should now have the latest version of PnP PowerShell installed.

Review a sample review and update below

PnPPowerShellUpdate

Sharing is caring!

Comments

  1. Thanks Eric, your instructions worked for me.

Speak Your Mind

*