This is the full example of how to copy files to an Azure Container with PowerShell.

For the full post on how to use Azure PowerShell to action things on Containers go here.

## Get Parameters
Param(
[string] $ResourceGroupName,
[string] $StorageAccountName,
[string] $StorageContainerName,
[string] $ArtifactStagingDirectory
)

## Static Parameters
#Login-AzureRmAccount
#Set-AzureRmContext -SubscriptionID 11111111-1111-1111-1111-111111111111
#$ResourceGroupName = "GroupName"
#$StorageAccountName = "AccountName"
#$StorageContainerName = "ContainerName"
#$ArtifactStagingDirectory = "Directory"

## Get Storage Account Details
Write-Output ("Get $StorageAccountName Account")
$storageAccount = ( Get-AzureRmStorageAccount | Where-Object{$_.StorageAccountName -eq $StorageAccountName} )

## Get files locations
Write-Output ("Get files path")
$ArtifactFilePaths = Get-ChildItem -Path "$ArtifactStagingDirectory\**" -Recurse -File | ForEach-Object -Process {$_.FullName}

## Loop and add content to container
Write-Output ("Start adding files to Storage Account $StorageAccountName Container $StorageContainerName")
foreach ($SourcePath in $ArtifactFilePaths) {

Write-Output ("Adding files from $ArtifactStagingDirectory ")

$SourcePath
$SourcePath.Substring($ArtifactStagingDirectory.length)
Set-AzureStorageBlobContent -File $SourcePath -Blob $SourcePath.Substring($ArtifactStagingDirectory.length) `

-Container $StorageContainerName -Context $StorageAccount.Context -Force

}

Write-Output ("End adding files to Storage Account $StorageAccountName Container $StorageContainerName")