如何使用PowerShell在AWS中创建IAM组和用户?
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 技术交流群。

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
toCurrentUser
as needed.