1

Need to Manage Azure Cloud Shell(ACS) storage account. As we have a huge audience who uses ACS it is difficult for us to manage individual storage. Sometimes we run short of the Storage account quota.

Is there a way to manage ACS storage via ARM/PowerShell.

Thank you in advance.

Stanley Gong
  • 11,522
  • 1
  • 8
  • 16
Madhur Asati
  • 185
  • 3
  • 13
  • I see, glad to know you have solved this issue,if my post is helpful, could you please click on the check mark beside the answer to toggle it from greyed out to filled in to accept it as an answer, so that it will help others and close this query : ) – Stanley Gong Apr 09 '21 at 02:30
  • We took an approach to create a group of users(Security group) in Azure AD. Then deploying ARM template which will create an RBAC role as a contributor on a RG level along with creating a Storage account. So when a user from that security group will log in to the Azure portal then he/she can reuse the available storage account from he RG by creating their own file share – Madhur Asati Apr 09 '21 at 02:35

1 Answers1

1

Per my understanding, you want to manage all ACS storage by PowerShell. Azure does not provide this kind of functionality natively, but each ACS storage assigned with a tag:ms-resource-usage:azure-cloud-shell: enter image description here

so you can list all of them by PowerShell below:

Get-AzResource -Tag @{ "ms-resource-usage"= "azure-cloud-shell"} -ResourceType "Microsoft.Storage/storageAccounts"

Result: enter image description here

So that you can manage them by PowerShell as you want.

If you don't want users to create new ACS storage accounts to occupy the storage account quota of your subscription, you can create an Azure policy to disallow this creation, details see this official guide, and ask your users to use existing storage accounts.

Stanley Gong
  • 11,522
  • 1
  • 8
  • 16