Adding a Co-administrator via PowerShell

前端 未结 2 403
夕颜
夕颜 2021-01-20 19:10

I know how to add a co-administrator via the portal, but need a way to add it via PowerShell.

I need this method as I have lost access to the login id, but have the

相关标签:
2条回答
  • 2021-01-20 20:01

    Unfortunately you can't. Azure PowerShell Cmdlets are essentially wrapper over Azure Service Management API and currently the API does not expose any method to add co-admins programmatically.

    0 讨论(0)
  • 2021-01-20 20:12

    Azure have rolled out Roll Based Access Control which will allow you to automate the adding of new admins to your Azure Subscription. Intro here: https://azure.microsoft.com/en-us/documentation/articles/role-based-access-control-configure/

    You would add a new user as an Owner at the Subscription scope. These operations are available using both PowerShell and REST

    0 讨论(0)
提交回复
热议问题