Chapter 24 Storage Accounts with CLI and PS

This Chapter covers following Lab Exercises

  • Create Storage Account Using CLI
  • Create Storage Account Using PowerShell

Exercise 187: Create Storage Account Using CLI

In this exercise we will create GPv2 Storage Account “stdcli410” in Resource Group HKCLI in East US 2 Location. Resource Group HKCLI was created in Exercise 181.

Connect to Azure using Azure CLI
Open command prompt (cmd) on your desktop and enter az login command for connecting and authenticating to Subscription.

Create Storage Account
az storage account create --name stdcli410 --resource-group HKCLI -- location eastus2 --sku Standard_LRS --kind StorageV2

Screenshot_766

Check the Storage Account created
az storage account show --name stdcli410 or az storage account show --name stdcli410 --resource-group HKCLI

Screenshot_767

Delete Storage Account
az storage account delete --name stdcli410
Note : Don’t run above command.

Exercise 188: Create Storage Account Using PowerShell

In this exercise we will create GPv2 Storage Account “stdps410” in Resource Group HKPS in East US 2 Location. Resource Group HKCLI was created in Exercise 182.

Connect to Azure using PowerShell
Open PowerShell command prompt on your desktop and login using Connect-AzureRmAccount.

Create Storage Account
New-AzureRmStorageAccount -ResourceGroupName HKPS -Name stdps410 -Location eastus2 -SkuName Standard_LRS -Kind StorageV2

Screenshot_768

Check the Storage Account created
Get-AzureRmStorageAccount -ResourceGroupName HKPS -Name stdps410

Screenshot_769

Delete Storage Account
Remove-AzureRmStorageAccount -ResourceGroupName HKPS -Name stdps410
Note: Don’t run above command.

UP

LIMITED OFFER: GET 30% Discount

This is ONE TIME OFFER

ExamSnap Discount Offer
Enter Your Email Address to Receive Your 30% Discount Code

A confirmation link will be sent to this email address to verify your login. *We value your privacy. We will not rent or sell your email address.

Download Free Demo of VCE Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.

Simply submit your e-mail address below to get started with our interactive software demo of your free trial.

Free Demo Limits: In the demo version you will be able to access only first 5 questions from exam.