1/25/2024 0 Comments Shelf organizerThe final command gets the containers for the contexts stored in $Context01 and $Context02 by using Get-AzStorageContainer. The second command creates a context for the account named ContosoGeneral that uses the specified key, and then stores that context in the $Context02 variable. The first command creates a context by using the local development storage account, and then stores that context in the $Context01 variable. ($Context01, $Context02) | Get-AzStorageContainer $Context02 = New-AzStorageContext -StorageAccountName "ContosoGeneral" -StorageAccountKey "" Example 6: Get multiple containers $Context01 = New-AzStorageContext -Local The command gets the Azure Storage container for the local developer storage account. This command creates a context by using the local development storage account, and then passes the new context to the Get-AzStorageContainer cmdlet by using the pipeline operator. Example 5: Get the container for the local developer storage account New-AzStorageContext -Local | Get-AzStorageContainer The command specifies the Local parameter. This command creates a context by using the local development storage account. Example 4: Create a context by using the local development storage account New-AzStorageContext -Local The command specifies HTTP as a connection protocol. This command creates a context for anonymous use for the account named ContosoGeneral. Example 3: Create a context for an anonymous storage account New-AzStorageContext -StorageAccountName "ContosoGeneral" -Anonymous -Protocol "http" This command creates a context based on the specified connection string for the account ContosoGeneral. Example 2: Create a context by specifying a connection string New-AzStorageContext -ConnectionString "DefaultEndpointsProtocol=https AccountName=ContosoGeneral AccountKey= " This command creates a context for the account named ContosoGeneral that uses the specified key. Examples Example 1: Create a context by specifying a storage account name and key New-AzStorageContext -StorageAccountName "ContosoGeneral" -StorageAccountKey "" See details of authentication of the Storage Service in. The default Authentication of a Storage Context is OAuth (Azure AD), if only input Storage account name. The New-AzStorageContext cmdlet creates an Azure Storage context. In this article Syntax New-Az Storage Context
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |