Azure Blob Storage: The PowerShell Way! - Blogs
X
26Sep

Azure Blob Storage: The PowerShell Way!

Hi folks!

Great to see you again.

This blog post is purely based on Azure Blob Storage: The PowerShell way!

In this blog post, I will

1.     Create a New Azure ResourceGroup

2.     Create a Storage account

3.     Create a New Container inside the Blob Storage of Storage Account.

4.     Upload a text file from your current machine to Azure container using AzCopy.

 

Please Follow the Steps Below:

 

#Create a New Azure Storage Account

$Location = 'southeast asia'

$ResourceGroup = 'Storage-RG'

$StorageAccountName = 'canarysteststorage'

$StorageSKU = 'Standard_LRS'

$ContainerName = 'myblobcontainer'

$FileCopySource = 'C:\myfolder'

$FileCopyDest = 'https://canarysteststorage.blob.core.windows.net/container1/'

 

Login-AzureRmAccount

 

#Create a New Azure Resource Group

New-AzureRmResourceGroup -Location $Location -Name $ResourceGroup

 

#Create a New Azure Storage Account

New-AzureRmStorageAccount -ResourceGroupName $ResourceGroup -Name $StorageAccountName -SkuName $StorageSKU -Location $Location

 

#Copy the Primary Storage key

$StorageKey = (Get-AzureRmStorageAccountKey -Name $StorageAccountName -ResourceGroupName $ResourceGroup).value[0]

 

#Copy the Storage key

$StorageContext = New-AzureStorageContext -StorageAccountKey $StorageKey -StorageAccountName $StorageAccountName

 

#Create a New Azure Storage Container

$container = New-AzureStorageContainer -Name $ContainerName -Context $StorageContext

 

AzCopy /Source:$FileCopySource /Dest:$FileCopyDest /DestKey:$key /Pattern:CanarysText.txt

Thanks for Reading!

Please Share your views/Comments.

 

 

Related

Azure App Service Scaling Features And Capabilities

How to scale the application in Azure App Service. There are two workflows for scaling, scale up and...

Read More >

Azure App Service (Build And Host Web Apps, Mobile-Back Ends Without Managing Infrastructure)

In this blog we will see what is Azure App Service, and it’s  features and why do we use it, we can...

Read More >

Create a Windows Server 2012 R2 VM using ARM in Azure PowerShell

Hi Folks,In this Blog Post we will learn how to create an Azure ARM Virtual Machine using Azure Powe...

Read More >

Continuous Integration/ Continuous Deployment VSTS

Following the below steps you can build and deploy your ASP.NET  app to Azure from either Visua...

Read More >

How to Sync On-premise AD with Windows Azure AD using Azure AD Connect tool

 Azure AD is a service that provides identity and access management capabilities in the cloud. ...

Read More >

Creating a Point-to-Site Connectivity using Azure Resource Manager

Configure a Point-to-Site connectivity to a VNet using PowerShell (ARM Mode)Task 1: Create a Self-Si...

Read More >

How to Create an Azure Virtual Network by using a Deployment Template

Hello Folks!In this Blog post, we will try to learn how to create an Azure V-Net using an ARM templa...

Read More >

Locking VMs and Resources Groups with Azure Resource Manager using Azure PowerShell

Hello Folks!In this blog post we will be talking about locking down your Azure Resources with Azure ...

Read More >

Microsoft Azure: Implementing Internet Facing Load Balancers using Azure Resource Manager

Howdy Folks!I was exploring Network Load Balancer in Azure Resource Manager and found out that you c...

Read More >

Microsoft Azure Stack : Power of Azure in our datacentre

Why Azure Stack?Microsoft Azure Stack is a new hybrid cloud platform product that enables our organi...

Read More >

Share

Try DevOpSmartBoard Ultimate complete Azure DevOps End-to end reporting tool

Sign Up

  • Recent
  • Popular
  • Tag
Tags
Monthly Archive
Subscribe
Name

Text/HTML
Contact Us
  • *
  • *