aws / aws-tools-for-powershell

The AWS Tools for PowerShell lets developers and administrators manage their AWS services from the PowerShell scripting environment.
Apache License 2.0
239 stars 79 forks source link

AWS.Tools Module Manifests are invalid #112

Closed AdilHindistan closed 4 years ago

AdilHindistan commented 4 years ago

Import-Module is complaining about module manifest.

PS > import-module aws.tools.ec2 VERBOSE: Skipping the Version folder 4.0.2 under Module H:\WindowsPowerShell\Modules\aws.tools.ec2 as it does not have a valid module manifest file. import-module : The specified module 'aws.tools.ec2' was not loaded because no valid module file was found in any module directory. At line:1 char:1

When I use Test-ModuleManifest, the problem it is pointing to is 'folder version'

PS C:\Users\f588394> Test-ModuleManifest H:\WindowsPowerShell\Modules\AWS.Tools.EC2\4.0.2\AWS.Tools.EC2.psd1
Test-ModuleManifest : The ModuleVersion key in module manifest 'H:\WindowsPowerShell\Modules\AWS.Tools.EC2\4.0.2\AWS.Tools.EC2.psd1' specifies module version '4.0.2.0' which does not match its version folder name at 'H:\WindowsPowerShell\Modules\AWS.Tools.EC2\4.0.2'. Change the value of the ModuleVersion key to match the version folder name.
At line:1 char:1

matteo-prosperi commented 4 years ago

It looks like the installation folder is incorrectly named. It is AWS.Tools.EC2\4.0.2, while it should be AWS.Tools.EC2\4.0.2.0. I never experienced this, how did you install the module?

AdilHindistan commented 4 years ago

I first installed the installer install-module aws.tools.installer -Scope CurrentUser -AllowClobber -Verbose which installed the installer to my Home drive (H:)

then installed the EC2 Install-AWSToolsModule -Name ec2

matteo-prosperi commented 4 years ago

This is unexpected, I tried now on my machine and the module is installed in C:\Users\whatever\Documents\PowerShell\Modules\AWS.Tools.EC2\4.0.2.0. Also Install-AWSToolsModule uses Install-Module to perform the module installation, so it is weird that it would get the folder name wrong.

Could you add here the results of the following commands?

$PSVersionTable
Get-Module powershellget -ListAvailable
Get-Module aws.tools.installer -ListAvailable

If you can, it would be great if you could uninstall all AWS.Tools modules and re-install them with

Install-AWSToolsModule -Name ec2 -Verbose

and report here the output of the command.

Thanks

AdilHindistan commented 4 years ago

Interesting enough, I got an error on that last one. Masking some output:

`PS I:> $psversiontable

Name Value


PSVersion 5.1.14409.1018 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.14409.1018 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

PS I:> Get-Module powershellget -ListAvailable
VERBOSE: Populating RepositorySourceLocation property for module PowerShellGet.
VERBOSE: Loading module from path '\my_network_drive\my_user_id\WindowsPowerShell\Modules\PowerShellGet\2.2.3\PSModule.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1'.

Directory: \\my_network_drive\my_user_id\WindowsPowerShell\Modules                                                            

ModuleType Version Name ExportedCommands


Script 2.2.3 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}

Directory: C:\Program Files\WindowsPowerShell\Modules                                                                                                              

ModuleType Version Name ExportedCommands


Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}

PS I:> Get-Module aws.tools.installer -ListAvailable VERBOSE: Cannot verify the Microsoft .NET Framework version 4.7.2 because it is not included in the list of permitted versions. VERBOSE: Populating RepositorySourceLocation property for module AWS.Tools.Installer. VERBOSE: Loading module from path '\my_network_drive\my_user_id\WindowsPowerShell\Modules\AWS.Tools.Installer\1.0.1.0\AWS.Tools.Installer.psm1'.

Directory: \\my_network_drive\my_user_id\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Script 1.0.1.0 AWS.Tools.Installer {Uninstall-AWSToolsModule, Install-AWSToolsModule, Update-AWSToolsModule}

PS I:\s\cloud> Install-AWSToolsModule -Name ec2 -Verbose -Proxy $p VERBOSE: [Install-AWSToolsModule] ConfirmPreference=High WhatIfPreference=False VerbosePreference=Continue Force=False Name=(ec2) RequiredVersion= SkipUpdate=False CleanUp=False VERBOSE: [Find-AWSToolsModule] ConfirmPreference=High WhatIfPreference=False VerbosePreference=Continue Name=(AWS.Tools.ec2) VERBOSE: Acquiring providers for assembly: \my_network_drive\my_user_id\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.MsuProvider.dll VERBOSE: Acquiring providers for assembly: \my_network_drive\my_user_id\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.NuGetProvider.dll VERBOSE: Acquiring providers for assembly: \my_network_drive\my_user_id\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.MetaProvider.PowerShell.dll VERBOSE: Acquiring providers for assembly: \my_network_drive\my_user_id\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.MsiProvider.dll VERBOSE: Acquiring providers for assembly: \my_network_drive\my_user_id\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.CoreProviders.dll VERBOSE: Acquiring providers for assembly: \my_network_drive\my_user_id\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.ArchiverProviders.dll Could not find AWS.Tools module on PSGallery: AWS.Tools.ec2. At \my_network_drive\my_user_id\WindowsPowerShell\Modules\AWS.Tools.Installer\1.0.1.0\AWS.Tools.Installer.psm1:286 char:17

AdilHindistan commented 4 years ago

OK, I went back to original computer from which I had initiated the install. It says it installed it but yeah, to the same 4.0.2 folder, missing that last '.0'

` install-module aws.tools.installer -Scope CurrentUser -AllowClobber -Verbose -Proxy http://myproxy:port Install-AWSToolsModule -Name ec2

PS C:\Users\my_user_name> Install-AWSToolsModule -Proxy http://myproxy:port -name ec2 -verbose VERBOSE: Populating RepositorySourceLocation property for module PowerShellGet. VERBOSE: Loading module from path 'H:\WindowsPowerShell\Modules\PowerShellGet\2.2.3\PSModule.psm1'. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1'. VERBOSE: Populating RepositorySourceLocation property for module PackageManagement. VERBOSE: Loading module from path 'H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\PackageManagement.psm1'. VERBOSE: Populating RepositorySourceLocation property for module PackageManagement. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.1.7.2\PackageManagement.psm1'. VERBOSE: Loading module from path 'H:\WindowsPowerShell\Modules\PowerShellGet\2.2.3\PowerShellGet.psd1'. VERBOSE: Populating RepositorySourceLocation property for module PackageManagement. VERBOSE: Loading module from path 'H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\PackageManagement.psm1'. VERBOSE: Populating RepositorySourceLocation property for module PackageManagement. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.1.7.2\PackageManagement.psm1'. VERBOSE: Loading module from path 'H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\PackageManagement.psd1'. VERBOSE: Loading 'FormatsToProcess' from path 'H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\PackageManagement.format.ps1xml'. VERBOSE: Populating RepositorySourceLocation property for module PackageManagement. VERBOSE: Loading module from path 'H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\PackageManagement.psm1'. VERBOSE: Loading module from path 'H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.dll'. VERBOSE: Loading module from path 'H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PowerShell.PackageManagement.dll'. VERBOSE: Importing cmdlet 'Find-Package'. VERBOSE: Importing cmdlet 'Find-PackageProvider'. VERBOSE: Importing cmdlet 'Get-Package'. VERBOSE: Importing cmdlet 'Get-PackageProvider'. VERBOSE: Importing cmdlet 'Get-PackageSource'. VERBOSE: Importing cmdlet 'Import-PackageProvider'. VERBOSE: Importing cmdlet 'Install-Package'. VERBOSE: Importing cmdlet 'Install-PackageProvider'. VERBOSE: Importing cmdlet 'Register-PackageSource'. VERBOSE: Importing cmdlet 'Save-Package'. VERBOSE: Importing cmdlet 'Set-PackageSource'. VERBOSE: Importing cmdlet 'Uninstall-Package'. VERBOSE: Importing cmdlet 'Unregister-PackageSource'. VERBOSE: Exporting cmdlet 'Find-Package'. VERBOSE: Exporting cmdlet 'Find-PackageProvider'. VERBOSE: Exporting cmdlet 'Get-Package'. VERBOSE: Exporting cmdlet 'Get-PackageProvider'. VERBOSE: Exporting cmdlet 'Get-PackageSource'. VERBOSE: Exporting cmdlet 'Import-PackageProvider'. VERBOSE: Exporting cmdlet 'Install-Package'. VERBOSE: Exporting cmdlet 'Install-PackageProvider'. VERBOSE: Exporting cmdlet 'Register-PackageSource'. VERBOSE: Exporting cmdlet 'Save-Package'. VERBOSE: Exporting cmdlet 'Set-PackageSource'. VERBOSE: Exporting cmdlet 'Uninstall-Package'. VERBOSE: Exporting cmdlet 'Unregister-PackageSource'. VERBOSE: Importing cmdlet 'Find-Package'. VERBOSE: Importing cmdlet 'Find-PackageProvider'. VERBOSE: Importing cmdlet 'Get-Package'. VERBOSE: Importing cmdlet 'Get-PackageProvider'. VERBOSE: Importing cmdlet 'Get-PackageSource'. VERBOSE: Importing cmdlet 'Import-PackageProvider'. VERBOSE: Importing cmdlet 'Install-Package'. VERBOSE: Importing cmdlet 'Install-PackageProvider'. VERBOSE: Importing cmdlet 'Register-PackageSource'. VERBOSE: Importing cmdlet 'Save-Package'. VERBOSE: Importing cmdlet 'Set-PackageSource'. VERBOSE: Importing cmdlet 'Uninstall-Package'. VERBOSE: Importing cmdlet 'Unregister-PackageSource'. VERBOSE: Loading 'FormatsToProcess' from path 'H:\WindowsPowerShell\Modules\PowerShellGet\2.2.3\PSGet.Format.ps1xml'. VERBOSE: Populating RepositorySourceLocation property for module PowerShellGet. VERBOSE: Loading module from path 'H:\WindowsPowerShell\Modules\PowerShellGet\2.2.3\PSModule.psm1'. VERBOSE: Exporting function 'Find-Command'. VERBOSE: Exporting function 'Find-DscResource'. VERBOSE: Exporting function 'Find-Module'. VERBOSE: Exporting function 'Find-RoleCapability'. VERBOSE: Exporting function 'Find-Script'. VERBOSE: Exporting function 'Get-CredsFromCredentialProvider'. VERBOSE: Exporting function 'Get-InstalledModule'. VERBOSE: Exporting function 'Get-InstalledScript'. VERBOSE: Exporting function 'Get-PSRepository'. VERBOSE: Exporting function 'Install-Module'. VERBOSE: Exporting function 'Install-Script'. VERBOSE: Exporting function 'New-ScriptFileInfo'. VERBOSE: Exporting function 'Publish-Module'. VERBOSE: Exporting function 'Publish-Script'. VERBOSE: Exporting function 'Register-PSRepository'. VERBOSE: Exporting function 'Save-Module'. VERBOSE: Exporting function 'Save-Script'. VERBOSE: Exporting function 'Set-PSRepository'. VERBOSE: Exporting function 'Test-ScriptFileInfo'. VERBOSE: Exporting function 'Uninstall-Module'. VERBOSE: Exporting function 'Uninstall-Script'. VERBOSE: Exporting function 'Unregister-PSRepository'. VERBOSE: Exporting function 'Update-Module'. VERBOSE: Exporting function 'Update-ModuleManifest'. VERBOSE: Exporting function 'Update-Script'. VERBOSE: Exporting function 'Update-ScriptFileInfo'. VERBOSE: Exporting function 'Add-PackageSource'. VERBOSE: Exporting function 'Download-Package'. VERBOSE: Exporting function 'Find-Package'. VERBOSE: Exporting function 'Get-DynamicOptions'. VERBOSE: Exporting function 'Get-Feature'. VERBOSE: Exporting function 'Get-InstalledPackage'. VERBOSE: Exporting function 'Get-PackageProviderName'. VERBOSE: Exporting function 'Initialize-Provider'. VERBOSE: Exporting function 'Install-Package'. VERBOSE: Exporting function 'Remove-PackageSource'. VERBOSE: Exporting function 'Resolve-PackageSource'. VERBOSE: Exporting function 'Uninstall-Package'. VERBOSE: Exporting variable 'PSGetPath'. VERBOSE: Exporting alias 'fimo'. VERBOSE: Exporting alias 'inmo'. VERBOSE: Exporting alias 'upmo'. VERBOSE: Exporting alias 'pumo'. VERBOSE: Exporting alias 'uimo'. VERBOSE: Importing function 'Find-Command'. VERBOSE: Importing function 'Find-DscResource'. VERBOSE: Importing function 'Find-Module'. VERBOSE: Importing function 'Find-RoleCapability'. VERBOSE: Importing function 'Find-Script'. VERBOSE: Importing function 'Get-CredsFromCredentialProvider'. VERBOSE: Importing function 'Get-InstalledModule'. VERBOSE: Importing function 'Get-InstalledScript'. VERBOSE: Importing function 'Get-PSRepository'. VERBOSE: Importing function 'Install-Module'. VERBOSE: Importing function 'Install-Script'. VERBOSE: Importing function 'New-ScriptFileInfo'. VERBOSE: Importing function 'Publish-Module'. VERBOSE: Importing function 'Publish-Script'. VERBOSE: Importing function 'Register-PSRepository'. VERBOSE: Importing function 'Save-Module'. VERBOSE: Importing function 'Save-Script'. VERBOSE: Importing function 'Set-PSRepository'. VERBOSE: Importing function 'Test-ScriptFileInfo'. VERBOSE: Importing function 'Uninstall-Module'. VERBOSE: Importing function 'Uninstall-Script'. VERBOSE: Importing function 'Unregister-PSRepository'. VERBOSE: Importing function 'Update-Module'. VERBOSE: Importing function 'Update-ModuleManifest'. VERBOSE: Importing function 'Update-Script'. VERBOSE: Importing function 'Update-ScriptFileInfo'. VERBOSE: Importing variable 'PSGetPath'. VERBOSE: Importing alias 'fimo'. VERBOSE: Importing alias 'inmo'. VERBOSE: Importing alias 'pumo'. VERBOSE: Importing alias 'upmo'. VERBOSE: [Install-AWSToolsModule] ConfirmPreference=High WhatIfPreference=False VerbosePreference=Continue Force=False Name=(ec2) RequiredVersion= SkipUpdate=False CleanUp=False VERBOSE: [Find-AWSToolsModule] ConfirmPreference=High WhatIfPreference=False VerbosePreference=Continue Name=(AWS.Tools.ec2) VERBOSE: Acquiring providers for assembly: H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.MsuProvider.dll VERBOSE: Acquiring providers for assembly: H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.ArchiverProviders.dll VERBOSE: Acquiring providers for assembly: H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.MetaProvider.PowerShell.dll VERBOSE: Acquiring providers for assembly: H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.CoreProviders.dll VERBOSE: Acquiring providers for assembly: H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.MsiProvider.dll VERBOSE: Acquiring providers for assembly: H:\WindowsPowerShell\Modules\PackageManagement\1.4.6\fullclr\Microsoft.PackageManagement.NuGetProvider.dll VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'False'; IsRegistered = 'True'. VERBOSE: Using the provider 'PowerShellGet' for searching packages. VERBOSE: Using the specified source names : 'PSGallery'. 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='AWS.Tools.ec2'' for ''. VERBOSE: Total package yield:'1' for the specified package 'AWS.Tools.ec2'. VERBOSE: [Find-AWSToolsModule] End VERBOSE: [Install-AWSToolsModule] Installing AWS Tools version 4.0.2.0 VERBOSE: [Install-AWSToolsModule] Searching installed modules VERBOSE: [Install-AWSToolsModule] Removing already installed modules from the. Final list of modules to install: (AWS.Tools.EC2)

Confirm Are you sure you want to perform this action? Performing the operation "Install-AWSToolsModule" on target "AWS Tools version 4.0.2.0". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y VERBOSE: [Install-AWSToolsModule] Create folder for temporary repository C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o VERBOSE: [Install-AWSToolsModule] Registering temporary repository AWSToolsTemp VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'False'; IsRegistered = 'True'. VERBOSE: The specified PackageManagement provider name 'NuGet'. VERBOSE: Successfully registered the repository 'AWSToolsTemp' with source location 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'. VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'False'; IsRegistered = 'True'. VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'False'; IsRegistered = 'True'. VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'False'; IsRegistered = 'True'. VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'False'; IsRegistered = 'True'. VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'False'; IsRegistered = 'True'. VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'False'; IsRegistered = 'True'. VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'False'; IsRegistered = 'True'. VERBOSE: The specified PackageManagement provider name 'NuGet'. VERBOSE: Successfully registered the repository 'AWSToolsTemp' with source location 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'. VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'True'; IsRegistered = 'True'. VERBOSE: [Install-AWSToolsModule] Downloading modules to temporary repository VERBOSE: [Install-AWSToolsModule] Downloading modules (AWS.Tools.EC2) VERBOSE: [Install-AWSToolsModule] Downloading module AWS.Tools.EC2 to C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] ConfirmPreference=None WhatIfPreference=False VerbosePreference=Continue Name=AWS.Tools.EC2 Path=C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o\AWS.Tools.EC2.4.0.2.0.nupkg VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] Manifest signature correctly validated VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] Found dependency AWS.Tools.Common VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] End VERBOSE: [Install-AWSToolsModule] Downloading module AWS.Tools.Common to C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] ConfirmPreference=None WhatIfPreference=False VerbosePreference=Continue Name=AWS.Tools.Common Path=C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o\AWS.Tools.Common.4.0.2.0.nupkg VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] Manifest signature correctly validated VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] End VERBOSE: [Install-AWSToolsModule] Installing modules (AWS.Tools.EC2) Installing module AWS.Tools.EC2 version 4.0.2.0 VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'True'; IsRegistered = 'True'. VERBOSE: Using the provider 'PowerShellGet' for searching packages. VERBOSE: Using the specified source names : 'AWSToolsTemp'. VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'. VERBOSE: The specified Location is 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o' and PackageManagementProvider is 'NuGet'. VERBOSE: Total package yield:'1' for the specified package 'AWS.Tools.EC2'. VERBOSE: Skipping installed module AWS.Tools.EC2 4.0.2. VERBOSE: [Install-AWSToolsModule] Modules install complete VERBOSE: [Install-AWSToolsModule] Unregistering temporary repository AWSToolsTemp VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'True'; IsRegistered = 'True'. VERBOSE: Repository details, Name = 'AWSToolsTemp', Location = 'C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o'; IsTrusted = 'True'; IsRegistered = 'True'. VERBOSE: Successfully unregistered the repository 'AWSToolsTemp'. VERBOSE: [Install-AWSToolsModule] Delete repository folder C:\Users\my_user_name\AppData\Local\Temp\5o2uj4zl.y1o VERBOSE: [Install-AWSToolsModule] End `

matteo-prosperi commented 4 years ago

I am not completely sure and I will have to check a "normal" log when I am back from vacation and at my computer again, but the line VERBOSE: Skipping installed module AWS.Tools.EC2 4.0.2. towards the end of your log looks irregular to me. It looks like you didn't really remove AWS.Tools.EC2 4.0.2 before invoking Install-AWSToolsModule -Name ec2.

If I read your log correctly, Install-AWSToolsModule -Name ec2 is not really doing anything because AWS.Tools.EC2 4.0.2 is already installed (it could be a leftover of a bad installation or something else).

Please make sure you remove AWS.Tools.Common and AWS.Tools.EC2 before running Install-AWSToolsModule. Make sure you double-check that the H:\WindowsPowerShell\Modules\AWS.Tools.EC2\4.0.2 folder is completely removed before proceeding (if necessary, delete the folder manually).

Double check with Get-Module AWS.Tools.* -ListAvailable that you don't have any leftover AWS.Tools module except for AWS.Tools.Installer.

Finally run again Install-AWSToolsModule -Name ec2 -Verbose and you should hopefully not see the Skipping installed module AWS.Tools.EC2 line in your log anymore.

AdilHindistan commented 4 years ago

I think I got to the bottom of this. It seems the problem is related to a previous version I have (3.3.390.0). Regardless, the first part with install-module AWS.Tools.Installer works fine and correctly creates h:/WindowsPowershell/Modules/AWS.Tools.Installer/1.0.1.0/

It then complained about possible collision as some of the cmdlets already exists. I recalled that I had used -allowclobber as suggested by the error output.

So, I removed 3.3.390 and let the install go thru without need to clobber. It installed on the correct version folder 4.0.2.0.

AdilHindistan commented 4 years ago

I am not completely sure and I will have to check a "normal" log when I am back from vacation and at my computer again, but the line VERBOSE: Skipping installed module AWS.Tools.EC2 4.0.2. towards the end of your log looks irregular to me. It looks like you didn't really remove AWS.Tools.EC2 4.0.2 before invoking Install-AWSToolsModule -Name ec2.

If I read your log correctly, Install-AWSToolsModule -Name ec2 is not really doing anything because AWS.Tools.EC2 4.0.2 is already installed (it could be a leftover of a bad installation or something else).

Please make sure you remove AWS.Tools.Common and AWS.Tools.EC2 before running Install-AWSToolsModule. Make sure you double-check that the H:\WindowsPowerShell\Modules\AWS.Tools.EC2\4.0.2 folder is completely removed before proceeding (if necessary, delete the folder manually).

Double check with Get-Module AWS.Tools.* -ListAvailable that you don't have any leftover AWS.Tools module except for AWS.Tools.Installer.

Finally run again Install-AWSToolsModule -Name ec2 -Verbose and you should hopefully not see the Skipping installed module AWS.Tools.EC2 line in your log anymore.

yes, sorry I had missed "uninstall" part of your message. Btw, yes I had to manually remove 4.0.2 folder, uninstall did not remove it.

matteo-prosperi commented 4 years ago

I will close this for now. If you experience further issues please reopen it. Also, if you get any insight on how you ended up with the folder named 4.0.2, that may be useful information. Thanks

cyberguild commented 4 years ago

It looks like the installation folder is incorrectly named. It is AWS.Tools.EC2\4.0.2, while it should be AWS.Tools.EC2\4.0.2.0. I never experienced this, how did you install the module?

I'm having the same exact problem as described by AdilHindistan. Reinstalling with -AllowClobber and -Force does no good. Same with using the msi installer.

Install-Module -Name AWS.Tools.Installer -AllowClobber -Force -Verbose Install-AWSToolsModule AWS.Tools.EC2,AWS.Tools.S3 -Scope CurrentUser -CleanUp

I'm going to try uninstalling any and all version I have and start over.

Quick update - I just uninstalled and just like AdilH. said - the folders and assets were not removed by uninstall even though Get-Module reported modules were gone. I did get an error performing the re-install:

Install-AWSToolsModule AWS.Tools.EC2,AWS.Tools.S3 -Scope CurrentUser -CleanUp

Installing module AWS.Tools.EC2 version 4.0.5.0 Installing module AWS.Tools.S3 version 4.0.5.0 Where-Object : The property 'Version' cannot be found on this object. Verify that the property exists. At C:\Program Files\WindowsPowerShell\Modules\AWS.Tools.Installer\1.0.1.0\AWS.Tools.Installer.psm1:177 char:69

ralish commented 4 years ago

@cyberguild I suspect you're hitting the issue I've just reported in #161.

luckerby commented 3 years ago

It looks like the installation folder is incorrectly named. It is AWS.Tools.EC2\4.0.2, while it should be AWS.Tools.EC2\4.0.2.0. I never experienced this, how did you install the module?

I've just ran into the same thing today, using the official install procedure here. Manually renaming the folder names for the installed modules and their required dependencies made things work.

geoced commented 3 years ago

Same here, I followed the procedure but the subfolders aren't named correctly (missing the last .0 in their version number) and so the modules are not visible to PowerShell. Very annoying having to manually rename everything !