-
-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating Pester on Windows 10 1809 throw an exception #1201
Comments
@robdesideri Thanks for reporting this. This is a whole new level of awfulness. Could you tell me what versions of PowerShell get you have please? get-module powershellget -List |
Hi @nohwnd,
|
I can reproduce it with both PowerShellGet 1.0.0.1 (built-in) and latest 2.0.3 on PowerShell 5.1 (latest Win10 insider). When you only have the built-in 3.4.0 version of Pester installed, the exception is thrown. If you already have 4.4.3 and try to install 4.4.4, then it installs fine with just |
I cannot replicate this, with the newer PowerShellGet. @fflaten are you sure you have the correct PowerShellGet version loaded? Using the built-in 1.6.0 version of PoweShellGet module I get the error you see because there is no exclusion for Pester, and so So @robdesideri I can only recommed updating your PowerShellGet. |
I think Wiki should mention updating PowerShellGet if this error occurs. Not everyone will look at closed issue to resolve the problem. |
@zlatin agree :) wiki is free to edit, feel free to add the info. If you don't I will add it over the weekend. https://github.com/pester/Pester/wiki/Installation-and-Update#installing-from-psgallery-windows-10-or-windows-server-2016 |
I've installed PS C:\WINDOWS\system32> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.17763.503
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.503
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS C:\WINDOWS\system32> Get-Module -Name PowerShellGet -ListAvailable
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.1.4 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCap...
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
PS C:\WINDOWS\system32> Get-Module -Name PowerShellGet
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.1.4 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
PS C:\WINDOWS\system32> Get-Module -Name Pester -ListAvailable
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 3.4.0 Pester {Describe, Context, It, Should...}
PS C:\WINDOWS\system32> Install-Module -Name Pester -Force -Repository PSGallery
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.8.1'. 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\2.1.4\PSModule.psm1:9521 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
Exception
+ FullyQualifiedErrorId :
PublishersMismatch,Validate-ModuleAuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
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.8.1'. 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\2.1.4\PSModule.psm1:9521 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
Exception
+ FullyQualifiedErrorId : PublishersMismatch,Validate-ModuleAuthenticodeSignature,Microsoft.PowerShell.PackageMana
gement.Cmdlets.InstallPackage |
|
@hassant Your code does not solve my problem: After executing
Any idea on how I could make this work? |
It was possible when using the the name of my local user "foobar" instead of "Administrators"
Once this command was executed was is possible to run the delete code
|
@thuld maybe your system is in a different language and the |
@nohwnd You are right. My lang. is DE. |
@thuld I fixed the deletion script in wiki to use SID and not the group name, and also updated my public gist that does the same thing. Thanks for pointing this out. |
1. General summary of the issue
Updating Pester by command described in the README document (
Install-Module -Name Pester -Force
), throw aPublishersMismatch
exception: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.4.4'. Installing the new module may result in system instability. If you still want to install or update, use -SkipPublisherCheck parameter.
2. Describe Your Environment
3. Expected Behavior
The command
Install-Module -Name Pester -Force
installs a new Pester version side-by-side with the already installed version.4.Current Behavior
The command
Install-Module -Name Pester -Force
throw the exception with FullyQualifiedError IdPublishersMismatch,Validate-ModuleAuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
.5. Possible Solution
At this moment, enabling the
SkipPublisherCheck
switch solves the issue.The text was updated successfully, but these errors were encountered: