Get-AzureRmBackupVault
Gets Backup vaults.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRmBackupVault
[[-ResourceGroupName] <String>]
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmBackupVault cmdlet gets Azure Backup vaults. This cmdlet returns AzureRmBackupVault objects for use with other cmdlets.
Examples
Example 1: View all the Backup vaults
PS C:\>Get-AzureRmBackupVault
This command gets all the Azure Backup vaults.
Example 2: View all vaults created in West US
PS C:\>Get-AzureRmBackupVault | Where-Object { $_.Region -eq "westus" }
This command gets all the Backup vaults.
The command passes them to the Where-Object cmdlet by using the pipeline operator.
That cmdlet filters the results based on the Region property.
For more information, type Get-Help Where-Object
.
Example 3: Get a specific vault
PS C:\>Get-AzureRmBackupVault -Name "Vault03"
ResourceId : /subscriptions/4bfbe168-f42a-4a06-8f5a-331cad1f497e/resourceGroups/ResourceGroup011/providers/Microsoft.Backup
/BackupVault/Vault
Name : Vault03
ResourceGroupName : ResourceGroup01
Region : westus
Storage : GeoRedundant
This command gets the vault named Vault03.
Example 4: Count the number of vaults that have locally redundant storage
PS C:\>Get-AzureRmBackupVault | Where-Object { $_.Storage -match "LocallyRedundant" } | Measure-Object
Count : 4
Average :
Sum :
Maximum :
Minimum :
Property :
This command gets all the Azure Backup vaults.
The command passes them to Where-Object, which filters the results based on the Storage property.
The command passes the ones that have a value of LocallyRedundant to the Measure-Object cmdlet, which counts the results.
For more information, type Get-Help Measure-Object
.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the Backup vault that this cmdlet gets. If more than one Backup vault has the same name, this cmdlet returns them all. Specify the ResourceGroupName parameter to get a unique vault.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of an Azure resource group in which this cmdlet gets a Backup vault.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None