Closed shayki5 closed 5 years ago
I am going to find someone from the ships team. You can also try and install the ships module separately. If it is there it should not try and install again.
@shayki5 I can't reproduce this issue.
PowerShellGet
module do you have on your system?
Get-Module PowerShellGet -ListAvailable
Get-PSRepository
//cc @jianyunt for additional input
I cann't repro the issue either. I tried
install-module ships -force -verbose -Repository psgallery
PS E:\> get-module Packagemanagement
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.2.0 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-PackageProvi...
PS E:\> get-module PowerShellGet
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.0.0 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCapability...}
Yeah, it looks like an old version of PowerShellGet is the problem.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809
@shayki5 as @HemantMahawar suggested, sharing the result of get-module PowershellGet -listavailable
may highlight the problem.
The other option is that the certificate store is out of date on the machine, so it can't validate the signature on the module.
Hi all,
Get-Module PowerShellGet -ListAvailable
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Get-PSRepository
Name InstallationPolicy SourceLocation
---- ------------------ --------------
PSGallery Untrusted https://www.powershellgallery.com/api/v2
Thank you!
Did upgrading your PowerShellGet fix your issue.
@shayki5 - You will need to upgrade PowerShellGet as the 1.0.0.1 version was included in the initial Windows 10 release and I saw this "version" be updated many many times, without the version being bumped up as part of the Windows Insider Program and it has many flaws, this being one of them
I upgraded the PowerShellGet with:
Install-Module –Name PowerShellGet –Force
Now I have this results:
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.0.4 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
The same issue still exist, how can I remove the 1.0.0.1?
I just checked my version of PowerShellGet and I am running 1.0.0.1 but I have none of these issues.
Have you tried since version 6.0.0 was released? I want to see if we can close this.
Doesn't work for me. I was only able to install this module with -SkipPublisherCheck
.
Microsoft Windows [Version 10.0.16299.431]
> Get-Module PowerShellGet, PackageManagement -ListAvailable | select Name,Version | sort Name
Name Version
---- -------
PackageManagement 1.0.0.1
PackageManagement 1.4.4
PackageManagement 1.0.0.1
PowerShellGet 1.0.0.1
PowerShellGet 2.2.1
PowerShellGet 1.0.0.1
> Get-PSRepository
Name InstallationPolicy SourceLocation
---- ------------------ --------------
PSGallery Trusted https://www.powershellgallery.com/api/v2
> Install-Module -Name VSTeam -Scope CurrentUser -Force -Verbose
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='VSTeam'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'VSTeam'.
VERBOSE: Performing the operation "Install-Module" on target "Version '6.3.3' of module 'VSTeam'".
VERBOSE: The installation scope is specified to be 'CurrentUser'.
VERBOSE: The specified module will be installed in 'C:\Users\beatcracker\Documents\WindowsPowerShell\Modules'.
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'VSTeam' with version '6.3.3' from the repository 'https://www.powershellgallery.com/api/v2'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='VSTeam'' for ''.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='SHiPS'' for ''.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Trackyon.Utils'' for ''.
VERBOSE: InstallPackage' - name='SHiPS', version='0.8.1',destination='C:\Users\beatcracker\AppData\Local\Temp\556642063'
VERBOSE: DownloadPackage' - name='SHiPS', version='0.8.1',destination='C:\Users\beatcracker\AppData\Local\Temp\556642063\SHiPS\SHiPS.nupkg', uri='https://www.powershellgallery.com/api/v2/package/SHiPS/0.8.1'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/SHiPS/0.8.1'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/SHiPS/0.8.1'.
VERBOSE: Completed downloading 'SHiPS'.
VERBOSE: Hash for package 'SHiPS' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='SHiPS', version='0.8.1',destination='C:\Users\beatcracker\AppData\Local\Temp\556642063'
VERBOSE: InstallPackage' - name='Trackyon.Utils', version='0.0.2',destination='C:\Users\beatcracker\AppData\Local\Temp\556642063'
VERBOSE: DownloadPackage' - name='Trackyon.Utils', version='0.0.2',destination='C:\Users\beatcracker\AppData\Local\Temp\556642063\Trackyon.Utils\Trackyon.Utils.nupkg', uri='https://www.powershellgallery.com/api/v2/package/Trackyon.Utils/0.0.2'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/Trackyon.Utils/0.0.2'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/Trackyon.Utils/0.0.2'.
VERBOSE: Completed downloading 'Trackyon.Utils'.
VERBOSE: Hash for package 'Trackyon.Utils' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='Trackyon.Utils', version='0.0.2',destination='C:\Users\beatcracker\AppData\Local\Temp\556642063'
VERBOSE: InstallPackage' - name='VSTeam', version='6.3.3',destination='C:\Users\beatcracker\AppData\Local\Temp\556642063'
VERBOSE: DownloadPackage' - name='VSTeam', version='6.3.3',destination='C:\Users\beatcracker\AppData\Local\Temp\556642063\VSTeam\VSTeam.nupkg', uri='https://www.powershellgallery.com/api/v2/package/VSTeam/6.3.3'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/VSTeam/6.3.3'.
VERBOSE: Catalog file 'SHiPS.cat' is not found in the contents of the module 'SHiPS' being installed.
PackageManagement\Install-Package : The module 'SHiPS' cannot be installed or updated because the authenticode signature of the file 'SHiPS.psd1' is not valid.
At C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : InvalidAuthenticodeSignature,ValidateAndGet-AuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
@beatcracker The error is with the ShiPS module. Feedback can be provided at https://github.com/PowerShell/ShiPS/
I am getting the exact same error on an Azure DevOps pipeline, even though the same code works locally. I am using an windows-2019
agent for the run. Any idea how can I solve this? I can't find any information on this error besides this thread
This must be a problem with the ShiPS module. Can you try to use -SkipPublisherCheck
?
@SebastianSchuetze that did the trick for me, thank you!
PS C:\Manoj> Install-Module -Name snTeamsTest -Force -SkipPublisherCheck PackageManagement\Install-Package : The following commands are already available on this system:' Add-TeamUser,Connect-MicrosoftTeams,Disconnect-MicrosoftTeams,Get-CsBatchPolicyAssignmentOperatio n,Get-CsPolicyPackage,Get-CsUserPolicyPackage,Get-CsUserPolicyPackageRecommendation,Get-Team,Get- TeamChannel,Get-TeamsApp,Get-TeamUser,Grant-CsUserPolicyPackage,New-CsBatchPolicyPackageAssignmen tOperation,New-Team,New-TeamChannel,New-TeamsApp,Remove-Team,Remove-TeamChannel,Remove-TeamsApp,R emove-TeamUser,Set-Team,Set-TeamArchivedState,Set-TeamChannel,Set-TeamPicture,Set-TeamsApp'. This module 'snTeamsTest' may override the existing commands. If you still want to install this module 'snTeamsTest', use -AllowClobber parameter. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.1.2\PSModule.psm1:9349 char:21
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackag
e) [Install-Package], Exception
+ FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Mic
rosoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
@v3manku - That error message tells you that you need to add the -AllowClobber
parameter as well.
@v3manku your error message has nothing to do with this module. You are trying to install a module snTeamsTest, which is none of ours. Is your problem related to the VSTeam module?
Thank you. You are right, this is from PS gallery
-SkipPublisherCheck worked for me even with version1.0.0.1. thanks!
Hi Folks I need a help I am using docker pull mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022
now I do docker run -it
I think you are in the wrong project. This is only about the VSTeam module.
If you have general questions I would recommend stack overflow.
ShiPS module is still incorrectly signed.
-SkipPublisherCheck
still helps to ignore it's issue and install VSTeam module.
-SkipPublisherCheck
worked for me also.
Thanks!
Steps to reproduce
Expected behavior
Actual behavior
Environment data