官术网_书友最值得收藏!

Configuring and using Azure Blob Storage

In the previous chapter, we created an Azure storage account using PowerShell and from the Azure Storage Explorer, we created a blob container for that storage account and uploaded some files to it as well.

In this section, we are going to configure Azure Blob Storage from PowerShell. We are going to use the same storage account that we created in the previous chapter, but now we will use PowerShell to add a blob container to it. We will also provide an example to create multiple blob containers at once. Therefore, take the following steps:

  1. First, we need to log in to the Azure account as follows:
Connect-AzAccount
  1. If necessary, select the right subscription as follows:
Select-AzSubscription -SubscriptionId "********-****-****-****-***********"
  1. Select the storage account that we created in the previous chapter and add it to a variable as follows:
$accountObject = Get-AzStorageAccount -ResourceGroupName "PacktPubStorageAccount" -AccountName "packtpubstorage"
  1. Then retrieve the context of the storage account:
$Context = $accountObject.Context
  1. Create a blob container to it with public access as Blob as follows:
new-AzStoragecontainer -Name "packtblobcontainerps" -Context $Context -Permission blob

We are going to use this blob container in the next section, where we will create an import into and an export using Azure Job.

主站蜘蛛池模板: 鄂托克前旗| 宁津县| 泰顺县| 武冈市| 杨浦区| 武邑县| 尖扎县| 巨野县| 汾阳市| 玛沁县| 高邮市| 怀来县| 孝义市| 化德县| 沐川县| 灵石县| 曲麻莱县| 新乡县| 图片| 曲周县| 奉化市| 宜春市| 阳山县| 陇川县| 昌平区| 巴林左旗| 长垣县| 黑河市| 和龙市| 永泰县| 卫辉市| 吉林省| 灌南县| 沭阳县| 莱芜市| 莲花县| 秦皇岛市| 通江县| 安徽省| 马边| 竹山县|