Add-WssBackupVolume

Add-WssBackupVolume

Adds a volume to a scheduled backup policy.

Sintaxis

Parameter Set: Default
Add-WssBackupVolume [-BackupPolicy] <ScheduledBackupPolicy> [-BackupVolume] <BackupVolume> [ <CommonParameters>]

Descripción detallada

The Add-WssBackupVolume cmdlet adds a volume to a scheduled backup policy. Use the cmdlet to add volumes and the files they contain to a backup.

Parámetros

-BackupPolicy<ScheduledBackupPolicy>

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

Alias

ninguno

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-BackupVolume<BackupVolume>

Specifies the volume to add to the scheduled backup policy.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿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.BackupVolume

    This cmdlet returns the backup volume.

Ejemplos

Example 1: Add a backup volume to a backup policy

This example adds a backup volume to scheduled backup policy.

The first command gets the current backup policy for the computer, makes it editable, and stores it in the variable named $ContosoBUPolicy24.

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

The third command adds the backup volume that is stored in $ContosoEmpData10 to the scheduled backup policy that is stored in $ContosoBUPolicy24.

PS C:\> $ContosoBUPolicy24 = Get-WBPolicy -Editable
PS C:\> $ContosoEmpData10 = Get-WBVolume –VolumePath F:\
PS C:\> Add-WssBackupVolume -BackupPolicy $ContosoBUPolicy24 -BackupVolume $ContosoEmpData10

Temas relacionados

Get-WssBackupVolume

Remove-WssBackupVolume