New-OBFileSpec

New-OBFileSpec

Creates a new OBFileSpec object based on the parameters that are specified.

구문

Parameter Set: Default
New-OBFileSpec [-FileSpec] <String[]> [[-NonRecursive]] [[-Exclude]] [ <CommonParameters>]

자세한 설명

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).

매개 변수

-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\*.*).

별칭

없음

필수 여부

false

위치

4

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-FileSpec<String[]>

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\*.*).

별칭

없음

필수 여부

true

위치

2

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-NonRecursive

Specifies that the items in the OBFileSpec object should be non-recursive, and only include the specified items.

별칭

없음

필수 여부

false

위치

3

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • None

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • 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.

예제

EXAMPLE 1

This example creates a new file specification for protection.

PS C:\> New-OBFileSpec -FileSpec C:\testdata –NonRecursive

관련 항목

Add-OBFileSpec

Get-OBFileSpec

Get-OBPolicy

New-OBRetentionPolicy

New-OBSchedule

Remove-OBFileSpec

Remove-OBPolicy

Set-OBPolicy

Set-OBRetentionPolicy

Set-OBSchedule