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.
- Open PowerShell as an admininistrator.
- *Optional: Check to see what PnP module(s) may be installed.
1Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version –Descending
- Uninstall PnP PowerShell
1Uninstall-Module SharePointPnPPowerShellOnline
- *Optional: Check again to verify that the module(s) have been removed
1Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version –Descending
- Install the latest version of PnP PowerShell
1Install-Module SharePointPnPPowerShellOnline
You should now have the latest version of PnP PowerShell installed.
Review a sample review and update below
Sharing is caring!
Thanks Eric, your instructions worked for me.