Get-AzKeyVaultManagedStorageAccount
Gets Key Vault managed Azure Storage Accounts.
Syntax
Get-AzKeyVaultManagedStorageAccount
[-VaultName] <String>
[[-AccountName] <String>]
[-InRemovedState]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzKeyVaultManagedStorageAccount
[-InputObject] <PSKeyVault>
[-InRemovedState]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzKeyVaultManagedStorageAccount
[-ResourceId] <String>
[-InRemovedState]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Gets a Key Vault managed Azure Storage Account if the name of the account is specified and the account keys are managed by the specified vault. If the account name is not specified, then all the accounts whose keys are managed by specified vault are listed.
Examples
Example 1: List all Key Vault managed Storage Accounts
Get-AzKeyVaultManagedStorageAccount -VaultName 'myvault'
Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :
Lists all the accounts whose keys are managed by vault 'myvault'
Example 2: Get a Key Vault managed Storage Account
Get-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -Name 'mystorageaccount'
Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/maddie1/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Active Key Name : key2
Auto Regenerate Key : False
Regeneration Period : 90.00:00:00
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :
Gets the details of Key Vault managed Storage Account of 'mystorageaccount' if its keys are managed by vault 'myvault'
Example 3: List all Key Vault managed Storage Accounts using filtering
Get-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -Name "test*"
Id : https://myvault.vault.azure.net:443/storage/test1
Vault Name : myvault
AccountName : test1
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/test1
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :
Id : https://myvault.vault.azure.net:443/storage/test2
Vault Name : myvault
AccountName : test2
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/test2
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :
Lists all the accounts whose keys are managed by vault 'myvault' that start with "test"
Parameters
-AccountName
Key Vault managed storage account name. Cmdlet constructs the FQDN of a managed storage account name from vault name, currently selected environment and manged storage account name.
Type: | String |
Aliases: | StorageAccountName, Name |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | True |
-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 |
-InputObject
Vault object.
Type: | PSKeyVault |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InRemovedState
Specifies whether to show the previously deleted storage accounts in the output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
Vault resource id.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
PSKeyVaultManagedStorageAccountIdentityItem
PSKeyVaultManagedStorageAccount
PSDeletedKeyVaultManagedStorageAccountIdentityItem
PSDeletedKeyVaultManagedStorageAccount
Related Links
Azure PowerShell