New-OBFileSpec
Creates a new OBFileSpec object based on the parameters that are specified.
语法
Default (默认值)
New-OBFileSpec
[-FileSpec] <String[]>
[-NonRecursive]
[-Exclude]
说明
The New-OBFileSpec cmdlet creates a new OBFileSpec object based on the parameters that are specified. The OBFileSpec object defines what items will be included or excluded from backups.
Multiple files, folders, or volumes can be included or excluded.
Volume paths can be specified using volume drive letters, volume mount points, or GUID-based volume names.
If a GUID-based volume name is specified, it should be terminated with a backslash (\\
).
The wildcard character (*
) can be used in the file name when specifying a path to a file or when specifying a file type to include or exclude.
The items in the OBFileSpec object can be specified to be either recursive (include the item and everything subordinate to the item in the file structure) or non-recursive (include only the item).
示例
EXAMPLE 1
New-OBFileSpec -FileSpec C:\testdata -NonRecursive
This example creates a new file specification for protection.
参数
-Exclude
Specifies the list of items that are to excluded from the OBFileSpec object.
This parameter can include file paths and volumes (such as C:
) or file specifications (such as C:\dir1\*.*
).
参数属性
类型: | SwitchParameter |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 4 |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-FileSpec
Specifies the list of items for the OBFileSpec object.
This parameter can include file paths and volumes (such as C:
) or file specifications (such as C:\dir1\*.*
).
参数属性
类型: | String[] |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 2 |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-NonRecursive
Specifies that the items in the OBFileSpec object should be non-recursive, and only include the specified items.
参数属性
类型: | SwitchParameter |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 3 |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
输入
None
输出
Microsoft.Internal.CloudBackup.Commands.OBFileSpec
This cmdlet displays the OBFileSpec object which describes a file specification. This can be added to the OBPolicy object as a source for backup.