如何使用PowerShell在AWS中创建IAM组和用户?

发布于 01-23 15:44 字数 509 浏览 1 评论 0原文

1我正在使用powerShell,并希望按下命令new-iaMgroup -path”/ps-greated groups/“ -groupname“ powerusers”,但要低于错误

new-iaMgroup:new-iamGroup:术语“ new-iamGroup”一词不被确认为CMDLET,功能,脚本文件或可操作程序的名称。检查名称的拼写,或者是否包括路径, 验证路径是否正确,然后重试。 在线:1个字符:1个

  • 新iAmgroup -path”/ps-reated groups/“ -groupname“ powerusers”
  •   + categoryInfo:objectNotFound :( new-iaMgroup:string)[],CommandnotFoundException
      +完全QualifiedErrid:CommandnotFoundException
    
     

如何解决?我是PowerShell的新手。您的帮助非常感谢

1 I am using PowerShell and want to run following command New-IAMGroup -Path "/ps-created-groups/" -GroupName "powerUsers", but getting below error

New-IAMGroup : The term 'New-IAMGroup' 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

  • New-IAMGroup -Path "/ps-created-groups/" -GroupName "powerUsers"
  •   + CategoryInfo          : ObjectNotFound: (New-IAMGroup:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

How can this be resolved? I am new to Powershell.Your help much appreciated

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余厌2025-01-30 15:44:14

AWS的PowerShell CLI不安装特定于服务的CMDLET。您需要自己安装。
请参阅AWS文档。 //docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up-windows.html

对于IAM,这将帮助您安装正确的CMDLET。

install -awstoolsmodule aws.tools.IdentityManagement-scope Allusers

,然后尝试运行您的命令。

PS根据需要将范围从Alluser更改为Currentuser

The powershell cli for AWS does not install service specific cmdlets. You need to install them yourself.
See AWS documentation for this - https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up-windows.html

For IAM this will help you install the right cmdlets.

Install-AWSToolsModule AWS.Tools.IdentityManagement -Scope AllUsers

And then try to run your commands.

P.S. change the scope from AllUsers to CurrentUser as needed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文