Add-WssBackupTarget

Add-WssBackupTarget

Adds a backup target to a scheduled backup.

Sintaxis

Parameter Set: Default
Add-WssBackupTarget [-BackupPolicy] <ScheduledBackupPolicy> [-BackupTarget] <BackupTarget> [-Force] [ <CommonParameters>]

Descripción detallada

The Add-WssBackupTarget cmdlet adds a backup target to a scheduled backup policy. A scheduled backup policy is a backup file specification that has a backup schedule associated with it. When you add a backup target to the backup policy, the backup job adds the files in the backup policy that you specify to the new target location.

Parámetros

-BackupPolicy<ScheduledBackupPolicy>

Specifies the scheduled backup policy to which to add the backup target.

Alias

ninguno

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-BackupTarget<BackupTarget>

Specifies the backup target to add.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Force

Fuerza que el comando se ejecute sin pedir confirmación al usuario.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.WindowsServerSolutions.DataProtection.ServerBackup.ObjectModel.BackupTarget

    This cmdlet returns the list of backup targets.

Ejemplos

Example 1: Add a backup target to a scheduled backup policy

This example adds a backup target to a backup policy.

The first command gets the current backup policy for the computer and stores it in the variable named $ContosoBUPolicy213.

The second command creates a new backup target from the volume on drive F: and stores it in the variable named $ContosoBUTarget05.

The third command adds the backup target that is stored in $ContosoBUTarget05 to the backup policy that is stored in $ContosoBUPolicy213.

PS C:\> $ContosoBUPolicy213 = Get-WssBackupPolicy
PS C:\> $ContosoBUTarget05 = New-WBBackupTarget –VolumePath "F:\"
PS C:\> Add-WssBackupTarget -BackupPolicy $ContosoBUPolicy213 -BackupTarget $ContosoBUTarget05

Temas relacionados

Get-WssBackupTarget

New-WssBackupTarget

Remove-WssBackupTarget