我相信由 “如何通过PowerShell脚本将自定义角色'自定义角色'添加到此资源组的应用程序'test-application'?” 你的意思是 “How can I create a role assignment of the role 'Custom Role' for the application 'test-application' for a Resource Group by PowerShell?” 如果是这种情况,您只需要创建一个角色分配。 https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-powershell 使用Azure PowerShell分配Azure角色- Azure RBAC| Microsoft Learn 要在PowerShell中执行此操作,您需要运行以下命令:
1条答案
按热度按时间xtupzzrd1#
我相信由
“如何通过PowerShell脚本将自定义角色'自定义角色'添加到此资源组的应用程序'test-application'?”
你的意思是
“How can I create a role assignment of the role 'Custom Role' for the application 'test-application' for a Resource Group by PowerShell?”
如果是这种情况,您只需要创建一个角色分配。
https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-powershell
使用Azure PowerShell分配Azure角色- Azure RBAC| Microsoft Learn
要在PowerShell中执行此操作,您需要运行以下命令:
其中:
<objectId>
是服务主体/企业应用程序的对象ID,<roleName>
是内置或自定义角色(例如,Custom Role
),<subscriptionId>
和<resourceGroupName>
是您要给予访问权限的相应订阅和资源组的标识符。示例: