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
235 stars 77 forks source link

Update-AWSToolsModule does not make upgrade to the latest version #340

Open PetrMa opened 4 months ago

PetrMa commented 4 months ago

Describe the bug

Hello, Currently I have installed AWSTools in version 4.1.515.0 and I would like to use command Update-AWSToolsModule -CleanUp to make an update to the latest version 4.1.516.0 which is currently available on https://www.powershellgallery.com/packages/AWSPowerShell/4.1.516

But if I run the command Update-AWSToolsModule -CleanUp I´ve got the answer that update modul will make an update to version 4.1.433.0 instead of the latest available version Performing the operation "Install-AWSToolsModule" on target "AWS Tools version 4.1.433.0". and the CleanUp command wants to uninstall all newest versions.

So how Can I use this command to update AWSTools to 4.1.516.0 and removing all older versions please?

image

Expected Behavior

Make an upgrade of all modules to latest version available on https://www.powershellgallery.com/packages/AWSPowerShell/

Current Behavior

The command make upgrade to old version of AWSTools

Reproduction Steps

Run a command Update-AWSToolsModule -CleanUp

Possible Solution

No response

Additional Information/Context

No response

AWS Tools for PowerShell version used

AWS.Tools 4.1.515

PowerShell version used

Name Value


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

Operating System and version

Windows Server 2022 Datacenter Edition

bhoradc commented 4 months ago

Hi @PetrMa,

Thank you for reporting this issue. I am able to reproduce it at my end, and therefore will discuss this further with the team for next steps.

Regards, Chaitanya

PetrMa commented 3 months ago

Hello @bhoradc,

some news about this bug please?

afroz429 commented 3 months ago

@PetrMa Sorry for the delay. I am unable to reproduce the issue on my computer. I reached out to @bhoradc and we tried it together but this time he wasn't able to reproduce on his computer either. here's the result with exact same module names and versions as you.


PS C:\Users\localuser> $PSVersiontable

Name                           Value
----                           -----
PSVersion                      5.1.22621.2506
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.2506
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

PS C:\Users\localuser> Get-Module AWS.Tools.Installer

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.0.2.5    AWS.Tools.Installer                 {Install-AWSToolsModule, Uninstall-AWSToolsModule, Update-AWSToolsModule}

PS C:\Users\localuser> Get-Module -Name AWSPowerShell,AWSPowerShell.NetCore,AWS.Tools.Common -ListAvailable

    Directory: C:\Users\localuser\Documents\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     4.1.515    AWS.Tools.Common                    {Clear-AWSHistory, Set-AWSHistoryConfiguration, Initialize-AWSDefaultConfiguration, Clear-AWSDefaultConfiguration...}
Binary     4.1.514    AWS.Tools.Common                    {Clear-AWSHistory, Set-AWSHistoryConfiguration, Initialize-AWSDefaultConfiguration, Clear-AWSDefaultConfiguration...}
Binary     4.1.467    AWS.Tools.Common                    {Clear-AWSHistory, Set-AWSHistoryConfiguration, Initialize-AWSDefaultConfiguration, Clear-AWSDefaultConfiguration...}
Binary     4.1.433    AWS.Tools.Common                    {Clear-AWSHistory, Set-AWSHistoryConfiguration, Initialize-AWSDefaultConfiguration, Clear-AWSDefaultConfiguration...}

PS C:\Users\localuser> Update-AWSToolsModule -CleanUp

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-AWSToolsModule" on target "AWS Tools version 4.1.538.0".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): n

Confirm
Are you sure you want to perform this action?
Performing the operation "Uninstall-AWSToolsModule" on target "AWS Tools version 4.1.515, 4.1.514, 4.1.467, 4.1.433".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

What is the AWS.Tools.Installer version you are using? Can you please run the Update-AWSToolsModule with -Verbose flag and send the results?

Thanks!

PetrMa commented 2 months ago

@afroz429 @bhoradc

Hello, sorry for the late response. I had a vacation.

I´am still on the same issue as described in my 1st post. image

The verbose command show this: image image

ashishdhingra commented 3 weeks ago

@PetrMa Good morning. Unfortunately, we are unable to reproduce the issue. Could you please check:

Thanks, Ashish

github-actions[bot] commented 3 weeks ago

This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

PetrMa commented 3 weeks ago

Hi @ashishdhingra

no, there is no directory Modules in %USERPROFILE%\Documents\WindowsPowerShell\

All modules are installed in C:\Program Files\WindowsPowerShell\Modules Modules are installed for all users, not for specific user.