I have tried using the basic commands from multiple websites and videos, but after installing AWS.Tools.Installer and AWS.Tools.S3 I get the same error when trying to use a command:
Set-Awscredentials : The term 'Set-Awscredentials' is not recognized
as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that
the path is correct and try again. At line:1 char:1
+ Set-Awscredentials
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Set-Awscredentials:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I've got multiple freshly imaged machines in our lab running Windows 10 Enterprise LTSC 2019 build 1809 and the result is the same on all of them. Here are the commands I run from an Admin prompt, in the order I run them, and they complete without issue:
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Set-PSrepository PSGallery -InstallationPolicy Trusted
Set-ExecutionPolicy Unrestricted -Force
Install-Module -Name AWS.Tools.Installer -Force -Confirm:$false -AllowClobber -Scope AllUsers
Install-AWSToolsModule -Name AWS.Tools.S3 -CleanUp -Confirm:$false -Verbose -Force
Get-Module -ListAvailable | ? Name -Like 'AWS.Tools.*'
Also of note, I actually ran them with each in a try/catch statement, where the catch exits, but I did not include that code for brevity's sake. These computers are not joined to a domain, so unexpected GPO settings shouldn't affect it.
In the above script, I did the AWS.Tools.S3 as Verbose, here's the output for that:
VERBOSE: [Install-AWSToolsModule] ConfirmPreference=None WhatIfPreference=False VerbosePreference=Continue Force=True
Name=(AWS.Tools.S3) RequiredVersion= SkipUpdate=False CleanUp=False
VERBOSE: [Find-AWSToolsModule] ConfirmPreference=None WhatIfPreference=False VerbosePreference=Continue
Name=(AWS.Tools.S3) VERBOSE: [Find-AWSToolsModule] End
VERBOSE: [Install-AWSToolsModule] Installing AWS Tools version 4.1.11.0
VERBOSE: [Install-AWSToolsModule] Searching installed modules
VERBOSE: [Install-AWSToolsModule] Removing already installed modules from the. Final list of modules to install:
(AWS.Tools.S3)
VERBOSE: [Install-AWSToolsModule] Create folder for temporary repository C:\Windows\TEMP\q3a2lhx5.t03
VERBOSE: [Install-AWSToolsModule] Registering temporary repository AWSToolsTemp
VERBOSE: [Install-AWSToolsModule] Downloading modules to temporary repository
VERBOSE: [Install-AWSToolsModule] Downloading modules (AWS.Tools.S3)
VERBOSE: [Install-AWSToolsModule] Downloading module AWS.Tools.S3 to C:\Windows\TEMP\q3a2lhx5.t03
VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] ConfirmPreference=None WhatIfPreference=False
VerbosePreference=Continue Name=AWS.Tools.S3 Path=C:\Windows\TEMP\q3a2lhx5.t03\AWS.Tools.S3.4.1.11.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:\Windows\TEMP\q3a2lhx5.t03
VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] ConfirmPreference=None WhatIfPreference=False
VerbosePreference=Continue Name=AWS.Tools.Common Path=C:\Windows\TEMP\q3a2lhx5.t03\AWS.Tools.Common.4.1.11.0.nupkg
VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] Manifest signature correctly validated
VERBOSE: [Get-AWSToolsModuleDependenciesAndValidate] End
VERBOSE: [Install-AWSToolsModule] Installing modules (AWS.Tools.S3) Installing module AWS.Tools.S3 version 4.1.11.0
VERBOSE: [Install-AWSToolsModule] Modules install complete
VERBOSE: [Install-AWSToolsModule] Unregistering temporary repository AWSToolsTemp
VERBOSE: [Install-AWSToolsModule] Delete repository folder C:\Windows\TEMP\q3a2lhx5.t03
VERBOSE: [Install-AWSToolsModule] End
After running that, I tried the following to confirm they were in the correct directories:
ls 'C:\Program Files\WindowsPowerShell\Modules'
ls 'C:\Users\Kiosk\Documents\WindowsPowerShell\Modules'
Write-Host '-----------------------------------------------------------------------'
Get-Module -ListAvailable | ? Name -Like 'AWS.Tools.*'
And this is what it gives me:
Directory: C:\Program Files\WindowsPowerShell\Modules
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 4/22/2021 11:02 AM AWS.Tools.Installer
d----- 9/15/2018 3:33 AM Microsoft.PowerShell.Operation.Validation
d----- 4/22/2021 11:02 AM PackageManagement
d----- 9/15/2018 3:33 AM Pester
d----- 4/22/2021 11:02 AM PowerShellGet
d----- 9/15/2018 3:33 AM PSReadline
d----- 9/4/2020 5:05 PM PSWindowsUpdate
-----------------------------------------------------------------------
Name : AWS.Tools.Installer
Path : C:\Program Files\WindowsPowerShell\Modules\AWS.Tools.Installer\1.0.2.1\AWS.Tools.Installer.psd1
Description : The AWS.Tools.Installer module makes it easier to install, update and uninstall other AWS.Tools
modules (see https://www.powershellgallery.com/packages/AWS.Tools.Common/).
You can use a single command like 'Install-AWSToolsModule EC2,S3' to install multiple modules.
You can also update all your installed AWS.Tools modules and remove old versions by running
`Update-AWSToolsModule -CleanUp`.
Guid : 450031c1-9177-4fc1-9518-93166b1a926b
Version : 1.0.2.1
ModuleBase : C:\Program Files\WindowsPowerShell\Modules\AWS.Tools.Installer\1.0.2.1
ModuleType : Script
PrivateData : {PSData}
AccessMode : ReadWrite
ExportedAliases : {}
ExportedCmdlets : {}
ExportedFunctions : {[Uninstall-AWSToolsModule, Uninstall-AWSToolsModule], [Install-AWSToolsModule,
Install-AWSToolsModule], [Update-AWSToolsModule, Update-AWSToolsModule]}
ExportedVariables : {}
NestedModules : {}
I have tried running the AWS Installer module with
powershell -NoProfile -command 'Install-AWSToolsModule -Name AWS.Tools.S3 -CleanUp -Confirm:$false -Verbose -Force'
Although these machines have never had any powershell run on them before I ran the first script. It just looks like the S3 module is not installing and I see no reason why. I am at the end of my rope with this one. Does anyone see what I am missing? Thanks!
Also, here is my $PSVersionTable:
Name Value
---- -----
PSVersion 5.1.17763.1007
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.1007
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1