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

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 >

Microsoft Azure : Mobile Services - Xamarian.Android with .Net

NOTE: Microsoft Azure recommends Azure App Service Mobile Apps for all new mobile backend deployment...

Read More >

Microsoft Azure : The cloud for modern business

 Why Azure? Microsoft Azure: Cloud Computing Platform and Services Move faster Save Money ...

Read More >

Share

Comments

Nice post! very informative and useful for all readers.
9/13/2019 4:43:39 PM | Reply
Nice work keep it up! Your posts are amazing, and very helpful to me.
9/12/2019 6:13:26 PM | Reply
Thank you for sharing very useful blog!!!!Azure DevOps online training Microsoft Azure DevOps TrainingMicrosoft Azure DevOps Online Training
8/1/2019 10:59:21 AM | Reply

Post a Comment

  • Recent
  • Popular
  • Tag
Monthly Archive
Subscribe
Name

Contact Us
  • *
  • *