你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzureSiteRecoveryProtectionProfileObject
创建 Site Recovery 保护配置文件对象。
注意
本文档中引用的 cmdlet 用于管理使用 Azure Service Manager (ASM) API 的旧 Azure 资源。 创建新的资源时,不建议使用此旧版 PowerShell 模块,因为 ASM 计划停用。 有关详细信息,请参阅 Azure Service Manager 停用。
Az PowerShell 模块是推荐的 PowerShell 模块,用于使用 PowerShell 管理 Azure 资源管理器 (ARM) 资源。
语法
New-AzureSiteRecoveryProtectionProfileObject
[-Name <String>]
-ReplicationProvider <String>
-RecoveryAzureSubscription <String>
-RecoveryAzureStorageAccount <String>
-ReplicationFrequencyInSeconds <String>
[-RecoveryPoints <Int32>]
[-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
[-ReplicationStartTime <TimeSpan>]
[-Force]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
New-AzureSiteRecoveryProtectionProfileObject
[-Name <String>]
-ReplicationProvider <String>
[-ReplicationMethod <String>]
-ReplicationFrequencyInSeconds <String>
[-RecoveryPoints <Int32>]
[-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
[-CompressionEnabled]
-ReplicationPort <UInt16>
[-Authentication <String>]
[-ReplicationStartTime <TimeSpan>]
[-AllowReplicaDeletion]
[-Force]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
说明
New-AzureSiteRecoveryProtectionProfileObject cmdlet 创建 Azure Site Recovery 保护配置文件对象。 此 cmdlet 创建一个 用于其他 cmdlet 的 ASRProtectionProfile 对象。
示例
示例 1:创建保护配置文件
PS C:\> New-AzureSiteRecoveryProtectionProfileObject -ReplicationProvider "HyperVReplica" -AllowReplicaDeletion -ApplicationConsistentSnapshotFrequencyInHours 1 -CompressionEnabled -RecoveryPoints 2 -ReplicationFrequencyInSeconds 30 -ReplicationMethod "Online" -ReplicationPort 8085 -ReplicationStartTime 1
Name :
ID :
ReplicationProvider : HyperVReplica
HyperVReplicaProviderSettingsObject : Microsoft.Azure.Portal.RecoveryServices.Models.Common.HyperVReplicaProviderSettings
HyperVReplicaAzureProviderSettingsObject :
此命令创建保护配置文件对象。
示例 2:为 HyperVReplicaAzure 提供程序创建保护配置文件
PS C:\> New-AzureSiteRecoveryProtectionProfileObject -Name "ProtectionProfile" -ReplicationProvider "HyperVReplicaAzure" -RecoveryAzureSubscription "cb53d0c3-bd59-4721-89bc-06916a9147ef" -RecoveryAzureStorageAccount "Contoso01" -ReplicationFrequencyInSeconds 30 -RecoveryPoints 1 -Force
Name : ProtectionProfile
ID :
ReplicationProvider : HyperVReplicaAzure
HyperVReplicaProviderSettingsObject :
HyperVReplicaAzureProviderSettingsObject : Microsoft.Azure.Portal.RecoveryServices.Models.Common.HyperVReplicaAzureProviderSettings
此命令为 HyperVReplicaAzure 提供程序创建保护配置文件。
参数
-AllowReplicaDeletion
指示保护配置文件允许删除副本实体。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ApplicationConsistentSnapshotFrequencyInHours
指定应用程序一致性快照的频率(以小时为单位)。
类型: | Int32 |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Authentication
指定要使用的身份验证类型。 此参数的可接受值为:Certificate 和 Kerberos。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-CompressionEnabled
指示保护配置文件启用压缩。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Force
强制运行命令而不要求用户确认。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
指定保护配置文件的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Profile
指定此 cmdlet 从中读取的 Azure 配置文件。 如果未指定配置文件,此 cmdlet 将从本地默认配置文件中读取。
类型: | AzureSMProfile |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-RecoveryAzureStorageAccount
指定要在其中存储 Azure 副本实体的Azure 存储帐户的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-RecoveryAzureSubscription
指定存储帐户的 Azure 订阅的 ID。 此参数指存储 Azure 副本实体的帐户。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-RecoveryPoints
指定保留恢复点的小时数。
类型: | Int32 |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ReplicationFrequencyInSeconds
指定复制的频率间隔(以秒为单位)。 此参数的可接受值为:
- 30
- 300
- 900
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ReplicationMethod
指定复制方法。 此参数的可接受值为:
- 联机。 通过网络进行复制。
- 脱机。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ReplicationPort
指定复制发生时所在的端口数。
类型: | UInt16 |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ReplicationProvider
指定复制提供程序的类型。 此参数的可接受值为:HyperVReplica 和 HyperVReplicaAzure。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ReplicationStartTime
指定复制的开始时间。 指定启动作业后的 24 小时内的时间。
类型: | TimeSpan |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |