Closed bo67192 closed 3 years ago
Hello, I will try to test this myself and see if I can get more insight.
This is very unexpected, you are getting an error running Install-Module Questions:
Install-Module AWS.Tools.EC2
$PSVersionTable
output?Possible workarounds:
Install-Module
the AWS.Tools modules for the services you need. This would actually be my suggested process on a container. AWS.Tools.Installer provides a useful simplification of the update and uninstallation processes, especially in case you want to use multiple AWS.Tools modules. Considering that you should never update or uninstall stuff from a container, you most likely don't need AWS.Tools.Installer at all.Hi @matteo-prosperi ,
Here's my $psversiontable
PS C:\> $psversiontable
Name Value
---- -----
PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0?}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
It looks like I can't install AWS.Tools.EC2
either:
PS C:\> install-module AWS.Tools.EC2
WARNING: Win32Helpers: Cannot add type. Compilation errors occurred.
WARNING: Could not find a part of the path 'C:\Users\ContainerAdministrator\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet\PSRepositories.xml'.
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want
to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
PackageManagement\Install-Package : The module 'AWS.Tools.Common' cannot be installed or updated because the authenticode signature of the file 'AWS.Tools.Common.psd1' is not valid.
At C:\program files\powershell\Modules\PowerShellGet\PSModule.psm1:9508 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.PowerShel\u2026lets.InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : InvalidAuthenticodeSignature,ValidateAndGet-AuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
but it looks like I can't install Pester either
PS C:\> install-module Pester
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want
to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
PackageManagement\Install-Package : The module 'Pester' cannot be installed or updated because the authenticode signature of the file 'Pester.psd1' is not valid.
At C:\program files\powershell\Modules\PowerShellGet\PSModule.psm1:9508 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.PowerShel\u2026lets.InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : InvalidAuthenticodeSignature,ValidateAndGet-AuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
I'm confused by this error
WARNING: Win32Helpers: Cannot add type. Compilation errors occurred.
Does that mean there's something wrong with my container, and it's not an AWS module problem?
Hi,
If you are not able to Install-Module
anything, then it is likely an issue with your container.
I would suggest trying on a different container than mcr.microsoft.com/powershell:6.2.3-nanoserver-1803
and see if you have better luck.
Not that it's recommended, but you could add '-SkipPublisherCheck' to the Install-Module command.
Hi @bo67192,
Please confirm if this is no longer an issue or if you are able to test it on a different container as suggested by @matteo-prosperi.
Thanks, Ashish
This issue has not recieved a response in 2 weeks. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
I'm trying to run
Install-Module AWS.Tools.Installer -force -confirm:$false
inside of a container frommcr.microsoft.com/powershell:6.2.3-nanoserver-1803
, but I get an error.Expected Behavior
I expect to be able to run
docker run -it mcr.microsoft.com/powershell:6.2.3-nanoserver-1803
And then this inside of the container
Install-Module AWS.Tools.Installer -force -confirm:$false;
And have the AWS tools installer available
Current Behavior
Instead of getting the install I get this
Steps to Reproduce (for bugs)
Run
to get a running powershell container, then run this inside of the container
I'm not running any other commands inside of the container.
Context
We're trying to use the AWS Powershell tools modularized version
Your Environment
I'm running windows 10 version 1803 build 17134.1246
I appreciate any help