Upload to Azure Blob Storage using a PowerShell GUI

The reason I put this together was because of a requirement for internal users to upload content to Azure Blob Storage. However, the following requirements were mandated:

  • The data they were uploading needed to be put in a specific container
  • Not to give the users keys / permissions to the Azure Blob Storage

Andrews-Super-Uploader.ps1 s a GUI wrapper for the Microsoft Azure AZCopy tool (AZCopy.exe) to simplify the process of uploading data to Azure Blob Storage.

Requirements:
  • The script will work natively in PowerShell 2.0+
  • The script requires the Microsoft Azure AZCopy Tool with default installation path – get it here
Usage:

There are no parameters or switches, simply execute the script

The main section you will need to edit in the code is this:

$DestList=[collections.arraylist]@(
[pscustomobject]@{Name=’CONTENT / MANIFEST CHINA’;Value=”https://XXX.blob.core.windows.net/tests-data/Products?SASKEY”}
[pscustomobject]@{Name=’CONTENT / MANIFEST QA1′;Value=”https://XXX.blob.core.windows.net/tests-data/Products?SASKEY”}
[pscustomobject]@{Name=’CONTENT / MANIFEST UAT1′;Value=”https://XXX.blob.core.windows.net/tests-data/Products?SASKEY”}
)
$DropDownBox = New-Object System.Windows.Forms.ComboBox
$DropDownBox.Location = New-Object System.Drawing.Size(109,126)
$DropDownBox.Size = New-Object System.Drawing.Size(479,20)
$DropDownBox.DropDownHeight = 200
$Form.Controls.Add($DropDownBox)
$DropDownBox.DataSource=$DestList
$DropDownBox.DisplayMember=’Name’

$SourceList1=[collections.arraylist]@(
[pscustomobject]@{Name=’PRODUCT FOLDER 1′;Value=”D:\TFS\ProductDownloads\PRODUCT FOLDER 1″}
[pscustomobject]@{Name=’PRODUCT FOLDER 2′;Value=”D:\TFS\ProductDownloads\PRODUCT FOLDER 2″}
[pscustomobject]@{Name=’PRODUCT FOLDER 3′;Value=”D:\TFS\ProductDownloads\PRODUCT FOLDER 3″}
)

Just add your Azure Blob Storage SAS Key(s), your local source(s), your destination container(s) and amend the Names as required

Screenshot:

Azure Blob Uploader

Once you have it configured the way you want, hide the config away from end users by converting it to an EXE using PS2EXE

The full code for this can be found in my GitHub Repo

Inspired by MVP Chris Goosen’s PST Import Tool

 

 

 

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *