Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在AWS PowerShell中设置AWS凭据_Powershell_Amazon Web Services_Amazon S3_Aws Powershell - Fatal编程技术网

如何在AWS PowerShell中设置AWS凭据

如何在AWS PowerShell中设置AWS凭据,powershell,amazon-web-services,amazon-s3,aws-powershell,Powershell,Amazon Web Services,Amazon S3,Aws Powershell,我刚刚下载了AWS Powershell的最新版本,并尝试了以下操作:在我不记得有任何问题之前。现在我收到以下错误消息: PS C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell> Set-AWSCredentials -AccessKey xxxxxxxx -SecretKey xxxxxxx -StoreAs xxxx Set-AWSCredentials : The term 'Set-AWSCredentials' i

我刚刚下载了AWS Powershell的最新版本,并尝试了以下操作:在我不记得有任何问题之前。现在我收到以下错误消息:

PS C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell> Set-AWSCredentials -AccessKey xxxxxxxx -SecretKey xxxxxxx -StoreAs xxxx
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 -AccessKey xxxxxxx -SecretKey xxxxx
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Set-AWSCredentials:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell>
有人知道我做错了什么吗?某些语法是否再次更改:-(


感谢

工具安装到符合PowerShell版本3或更高版本中自动导入支持的文件夹结构中,因此不需要导入模块

但是,它确实需要安装程序执行的
PSModulePath
更新生效,我们注意到,在某些系统上,安装后需要重新启动

查看
PSModulePath
您应该会看到类似的内容(请原谅包装):

PS C:\>ls环境:PSModulePath|fl 名称:PSModulePath 值:C:\Users\userid\Documents\WindowsPowerShell\Modules;C:\Program 文件\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files(x86)\AWS Tools\PowerShell\ 如果是这样,请尝试重新启动计算机,然后打开shell提示符,查看
Set AWSCredentials
是否可用。如果不可用,请返回报告,我们将尝试重新启动。

尝试以下两个选项:

  • 正如@steve roberts所说,重启电脑(对我来说不起作用)
  • 安装最新的Power shell版本()

  • 最好,

    您可能必须使用
    导入模块导入aws模块
    我以前从未导入过任何模块。您能给我一些详细信息吗。请注意,我刚刚下载并安装了aws powershell,我正在使用aws powershell。谢谢如果您刚刚安装了aws工具包,您可以尝试关闭当前的powershell窗口并重新打开它(假设在安装之前它已经打开。)@Alan您知道您以前使用的AWS PowerShell版本吗?我上次使用AWS PowerShell是大约两个月前,当时是最新版本。我只想设置凭据:-(我现在在两台机器上试用过。到目前为止,我对AWS powershell的体验还不太好。但愿我不必这么说,而只是我的体验。 PS C:\> ls env:PSModulePath | fl Name : PSModulePath Value : 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\