New-AzRecoveryServicesVault
Creates a new Recovery Services vault.
Syntax
Default (Default)
New-AzRecoveryServicesVault
-Name <String>
-ResourceGroupName <String>
-Location <String>
[-Tag <Hashtable>]
[-DisableClassicAlerts <Boolean>]
[-DisableAzureMonitorAlertsForJobFailure <Boolean>]
[-PublicNetworkAccess <PublicNetworkAccess>]
[-ImmutabilityState <ImmutabilityState>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzRecoveryServicesVault cmdlet creates a new Recovery Services vault.
Examples
Example 1
New-AzRecoveryServicesVault -Name "vaultName" -ResourceGroupName "rg" -Location "eastasia"
Create recovery service vault in resource group and given location.
Example 2: Create recovery service vault with ImmutabilityState, PublicNetworkAccess options
$tag= @{"tag1"="value1";"tag2"="value2"}
New-AzRecoveryServicesVault -Name "vaultName" -ResourceGroupName "resourceGroupName" -Location "westus" -Tag $tag -ImmutabilityState "Unlocked" -PublicNetworkAccess "Disabled"
Create recovery service vault with options like ImmutabilityState, PublicNetworkAccess. Please note Public Network Access is by default enabled for RS vault (if not specified) and can be updated using Update-AzRecoveryServicesVault cmdlet.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DisableAzureMonitorAlertsForJobFailure
Boolean parameter to specify whether built-in Azure Monitor alerts should be received for every job failure.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DisableClassicAlerts
Boolean parameter to specify whether backup alerts from the classic solution should be disabled or enabled.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ImmutabilityState
Immutability State of the vault. Allowed values are "Disabled", "Unlocked", "Locked".
Unlocked means Enabled and can be changed, Locked means Enabled and can't be changed.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Location
Specifies the name of the geographic location of the vault.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Specifies the name of the vault to create.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PublicNetworkAccess
Parameter to Enable/Disable public network access of the vault. This setting is useful with Private Endpoints.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Specifies the name of the Azure resource group in which to create or from which to retrieve the specified Recovery Services object.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
Specifies the Tags to add to the Recovery Services Vault
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
None
Outputs