【问题标题】:New-AzureRmRoleAssignment : Parameter set cannot be resolved using the specified named parametersNew-AzureRmRoleAssignment :无法使用指定的命名参数解析参数集
【发布时间】:2018-08-29 13:10:36
【问题描述】:

我正在尝试更改用户的角色。在我看来,这必须由 New-AzureRmRoleAssignment 完成,因为没有更改或设置命令。当我尝试为用户分配角色时,我收到消息:

New-AzureRmRoleAssignment : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ New-AzureRmRoleAssignment -SignInName "tyler.xxxxx_xxxxx-europe.com"

我使用的命令是:

New-AzureRmRoleAssignment -SignInName "tyler.xxxxx_xxxxx-europe.com"  -RoleDefinitionid 4befb2f4-78ae-4354-9bbe-91f67ac41224 -ResourceGroupName "Default-Networking"

我在获取角色后复制了 ID。

我不知道为什么会收到这条消息,谁能给我建议?

里昂

【问题讨论】:

    标签: azure variable-assignment role


    【解决方案1】:

    似乎不支持这种参数组合。

    您可以使用角色定义名称而不是 id 来做到这一点:

    New-AzureRmRoleAssignment -SignInName 'user@company.com' -ResourceGroupName 'resource-group-name' -RoleDefinitionName 'Reader'
    

    【讨论】:

      猜你喜欢
      • 2019-09-02
      • 1970-01-01
      • 1970-01-01
      • 2022-11-16
      • 2019-04-05
      • 2014-09-05
      • 2020-07-23
      • 2018-05-13
      • 2015-10-12
      相关资源
      最近更新 更多