Get-AzStorageEncryptionScope
Get or list encryption scopes from a Storage account.
Syntax
Get-AzStorageEncryptionScope
[-ResourceGroupName] <String>
[-StorageAccountName] <String>
[-EncryptionScopeName <String>]
[-MaxPageSize <Int32>]
[-Filter <String>]
[-Include <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzStorageEncryptionScope
-StorageAccount <PSStorageAccount>
[-EncryptionScopeName <String>]
[-MaxPageSize <Int32>]
[-Filter <String>]
[-Include <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzStorageEncryptionScope cmdlet gets or lists encryption scopes from a Storage account.
Examples
Example 1: Get a single encryption scope
Get-AzStorageEncryptionScope -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -EncryptionScopeName $scopename
ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount
Name State Source KeyVaultKeyUri
---- ----- ------ --------------
testscope Disabled Microsoft.Keyvault https://keyvalutname.vault.azure.net:443/keys/keyname
This command gets a single encryption scope.
Example 2: List all encryption scopes of a Storage account
Get-AzStorageEncryptionScope -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount"
ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount
Name State Source KeyVaultKeyUri
---- ----- ------ --------------
testscope Disabled Microsoft.Keyvault https://keyvalutname.vault.azure.net:443/keys/keyname
scope2 Enabled Microsoft.Storage
This command lists all encryption scopes of a Storage account.
Example 3: List all enabled encryption scopes of a Storage account with a max page size of 10 for each request
Get-AzStorageEncryptionScope -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -MaxPageSize 10 -Include Enabled
ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount
Name State Source KeyVaultKeyUri
---- ----- ------ --------------
scope1 Enabled Microsoft.Keyvault https://keyvalutname.vault.azure.net:443/keys/keyname
scope2 Enabled Microsoft.Storage
This command lists all enabled encryption scopes of a Storage account, with a max page size of 10 encryption scopes included in each list response. If there are more than 10 encryption scopes to be listed, the command will still list all the encryption scopes, but with multiple requests sent and responses received.
Example 4: List all disabled encryption scopes with names starting with "test" of a Storage account
Get-AzStorageEncryptionScope -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -Include Disabled -Filter "startswith(name, test)"
ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount
Name State Source KeyVaultKeyUri
---- ----- ------ --------------
testscope1 Disabled Microsoft.Keyvault https://keyvalutname.vault.azure.net:443/keys/keyname
testscope2 Disabled Microsoft.Storage
This command lists all disabled encryption scopes with names starting with "test" of a Storage account. The parameter "Filter" specifies the prefix of the encryption scopes listed, and it should be in format of "startswith(name, {prefixValue})".
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EncryptionScopeName
Azure Storage EncryptionScope name
Type: | String |
Aliases: | Name |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Filter
The filter of encryption scope name. When specified, only encryption scope names starting with the filter will be listed.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Include
The filter of encryption scope name. When specified, only encryption scope names starting with the filter will be listed.
Type: | String |
Accepted values: | All, Enabled, Disabled |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxPageSize
The maximum number of encryption scopes that will be included in the list response
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group Name.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageAccount
Storage account object
Type: | PSStorageAccount |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageAccountName
Storage Account Name.
Type: | String |
Aliases: | AccountName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |