Compartilhar via


New-WBPolicy

New-WBPolicy

Creates a backup policy object.

Syntax

New-WBPolicy [ <CommonParameters>]

Detailed Description

The New-WBPolicy cmdlet creates a backup policy object. The new backup policy object does not contain information about the volumes included in the policy, the files in the backup, the backup target, or any scheduled times.

To make a new policy for scheduled backups, use the Set-WBPolicy cmdlet to define what items to include or exclude in backups, when to run backups, and where to store backups. To make a one-time backup from policy settings, use the Start-WBBackup cmdlet.

To use this or any other Windows Server 2012 Backup cmdlet, you must be a member of the Administrators group or Backup Operators group.

Parameters

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

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

  • None

    None

Outputs

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

  • WBPolicy

    The New-WBPolicy object generates an empty WBPolicy object in edit mode.

Examples

Example 1: Create a backup policy

This command creates an empty WBPolicy object and saves it in the $Policy variable. Use the WBPolicy object to specify the settings for backup.

PS C:\> $Policy = New-WBPolicy

Get-WBPolicy

Remove-WBPolicy

Set-WBPolicy

Start-WBBackup