-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInitStorage.ps1
More file actions
18 lines (14 loc) · 874 Bytes
/
InitStorage.ps1
File metadata and controls
18 lines (14 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Execute this script after loading the azure subscription credentials
$accountName = "filehb"
$location = "West Europe"
$handbackContainer = "handback"
$processedContainer = "processedblobs"
$handbackQueue = "handbackqueue"
New-AzureStorageAccount -StorageAccountName $accountName -Location $location
$storageKey = Get-AzureStorageKey -StorageAccountName $accountName | %{$_.Primary} # Get the primary key only
$storContext = New-AzureStorageContext -StorageAccountName $accountName -StorageAccountKey $storageKey -Protocol Https
# Create the containers for the blobs
New-AzureStorageContainer -Name $handbackContainer -Permission Off -Context $storContext
New-AzureStorageContainer -Name $processedContainer -Permission Off -Context $storContext
# Create the queue used for messaging to the worker roles
New-AzureStorageQueue -Name $handbackqueue -Context $storContext