Quantcast
Channel: Terence Luk
Viewing all articles
Browse latest Browse all 836

Creating Azure Storage Account Containers and adding Metadata using a list on an Excel spreadsheet

$
0
0

I recently worked on a project where we had to create hundreds of containers in multiple Azure Storage Accounts because we needed to the storage account SFTP service and in order to jail users into their own directories, each local SFTP user account needed to have their home folders set to their own containers. This may change in the future but working with this requirement meant many containers had to be created. In addition to creating containers, I also wanted each to have metadata added for the organization that the container belonged to so to reduce the repetitive manual labour, I decided to write a script.

The script can be I created can be found at my following GitHub repo: https://github.com/terenceluk/Azure/blob/main/PowerShell/Create-Storage-Account-Container.ps1

The format of the spreadsheet should look as such:

image

To handle scenarios where new storage account containers are added at a later time after the script has been executed once, the code will check and skip the creation of the container if it already exists.

Hope this helps anyone who might be looking for a script like this.


Viewing all articles
Browse latest Browse all 836

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>