New-OBRecoverableItem
Creates a new OBRecoverableItem for the given path.
语法
Default (默认值)
New-OBRecoverableItem
[-OBRecoverableItem] <CBRecoverableItem>
[-RelativePath] <String>
[-IsDir] <Boolean>
说明
The New-OBRecoverableItem cmdlet creates a new OBRecoverable item with a given relative path. This file path would be used to recover the file item from a recovery point.
To use Microsoft Azure Backup cmdlets, the user needs to be an administrator on the protected machine.
示例
EXAMPLE 1
$sources = Get-OBRecoverableSource
$rp = Get-OBRecoverableItem $sources[0]
$new_item1 = New-OBRecoverableItem $rp[0] "resources\folder" $TRUE
$new_item2 = New-OBRecoverableItem $rp[0] "resources\folder\file.txt" $FALSE
Start-OBRecovery @($new_item1, $new_item2)
This example creates a new recovery item.
参数
-IsDir
Specify if the relative path is a directory through the use of the Boolean value TRUE or a file by specifying FALSE. This parameter is mandatory.
参数属性
类型: | Boolean |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 3 |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-OBRecoverableItem
This is the point in time to which the relative path will be appended to create the new recoverable item.
参数属性
类型: | CBRecoverableItem |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 1 |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-RelativePath
This is the relative path which would be appended to the given recoverable item to create the new recoverable item.
参数属性
类型: | String |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 2 |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |