Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

New-OBFileSpec

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

New-OBFileSpec

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

Syntax

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




Detailed Description

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

Parameters

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


Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-NonRecursive

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


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

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


Examples

EXAMPLE 1

This example creates a new file specification for protection.


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

Related topics

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.