你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Disable-AzRecoveryServicesBackupRPMountScript

卸载恢复点的所有文件。

语法

Default (默认值)

Disable-AzRecoveryServicesBackupRPMountScript
    [-RecoveryPoint] <RecoveryPointBase>
    [-PassThru]
    [-VaultId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

说明

Disable-AzRecoveryServicesBackupRPMountScript cmdlet 会卸载之前使用 Get-AzRecoveryServicesBackupRPMountScript cmdlet 装载的恢复点的文件。

示例

示例 1:卸载恢复点

$namedContainer = Get-AzRecoveryServicesBackupContainer  -ContainerType "AzureVM" -Status "Registered" -FriendlyName "V2VM"
$backupitem = Get-AzRecoveryServicesBackupItem -Container $namedContainer  -WorkloadType "AzureVM"
$startDate = (Get-Date).AddDays(-7)
$endDate = Get-Date
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -Item $backupitem -StartDate $startdate.ToUniversalTime() -EndDate $enddate.ToUniversalTime()

<# To mount files of the latest recovery point, obtain the script by #>

Get-AzRecoveryServicesBackupRPMountScript -RecoveryPoint $rp[0]

OsType  Password        Filename
------  --------        --------
Windows e3632984e51f496 V2VM_wus2_8287309959960546283_451516692429_cbd6061f7fc543c489f1974d33659fed07a6e0c2e08740.exe

<#  When the script is run, it will mount the files of the recovery point $rp[0]

After the relevant files are copied, then you remove the files of the recovery point by running the disable cmdlet #>

Disable-AzRecoveryServicesBackupRPMountScript -RecoveryPoint $rp[0]

示例 2

卸载恢复点的所有文件。 (autogenerated)

Disable-AzRecoveryServicesBackupRPMountScript -Confirm -RecoveryPoint $rp[0] -VaultId $vault.ID

参数

-Confirm

在运行 cmdlet 之前,提示你进行确认。

参数属性

类型:SwitchParameter
默认值:False
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

参数属性

类型:IAzureContextContainer
默认值:None
支持通配符:False
不显示:False
别名:AzContext, AzureRmContext, AzureCredential

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-PassThru

返回恢复点。

参数属性

类型:SwitchParameter
默认值:False
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RecoveryPoint

要还原的恢复点对象

参数属性

类型:RecoveryPointBase
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:0
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-VaultId

恢复服务保管库的 ARM ID。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

显示 cmdlet 运行时会发生什么情况。 命令脚本未运行。

参数属性

类型:SwitchParameter
默认值:False
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

RecoveryPointBase

String

输出

RecoveryPointBase