Export (0) Print
Expand All

Add-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

Add-OBFileSpec

Adds the OBFileSpec object, which specifies the items to include or exclude from a backup, to the backup policy (OBPolicy object).

Syntax

Parameter Set: Default
Add-OBFileSpec [-Policy] <CBPolicy> [-FileSpec] <CBFileSpec[]> [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Add-OBFileSpec cmdlet adds the OBFileSpec object, which specifies the items to include or exclude from a backup, to the backup policy (OBPolicy object). The OBFileSpec object can include or exclude multiple files, folders, or volumes. The list of items to include can be defined by using the New-OBFileSpec cmdlet and then update the OBPolicy object using this cmdlet. The Add-OBFileSpec cmdlet supports WhatIf and Confirm parameters with a low impact. The low impact signifies that the cmdlet will not prompt the user by default. The WhatIf parameter gives a verbose description of what the cmdlet does. The Confirm parameter specifies whether the cmdlet should prompt the user. Using –Confirm:$FALSE will override the prompt.

To use Microsoft Azure Backup cmdlets, the user must be a member of the Administrators group or Backup Operators group.

Parameters

-FileSpec<CBFileSpec[]>

Specifies the OBFileSpec object to add to the backup policy.


Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Policy<CBPolicy>

Specifies the backup policy (OBPolicy object) to update.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.


Required?

false

Position?

named

Default Value

false

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

Examples

EXAMPLE 1

This example adds a file specification.


PS C:\> $policy = Get-OBPolicy
New-OBFileSpec -FileSpec "C:\testdata" –NonRecursive | Add-OBFileSpec -Policy $policy

EXAMPLE 2

This example adds a file specification.


PS C:\> $fspec = New-OBFileSpec -FileSpec C:\testdata –NonRecursive
PS C:\> New-OBPolicy | Add-OBFileSpec -FileSpec $fspec

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft