How can I set AWS credentials in AWS PowerShell
The tools install to a folder structure compliant with the auto-import support in PowerShell version 3 or higher, so Import-Module
should not be needed.
It does however require that the PSModulePath
update the installer performs takes effect, and we've noticed that on some systems you need to reboot after install.
Looking at PSModulePath
you should see something like this (excuse wrapping):
PS C:\> ls env:PSModulePath | flName : PSModulePathValue : C:\Users\userid\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files (x86)\AWS Tools\PowerShell\
If so, try restarting your machine and then open a shell prompt and see if Set-AWSCredentials
becomes available. If not, report back and we'll try and repro.
try this two options:
- As @steve-roberts said, restart pc (didn't work for me)
- Install the latest Power shell version (https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-7.1)
Best,