Remove-WBVolume
Remove-WBVolume
Removes the volume from the backup policy.
Sintaxis
Parameter Set: Default
Remove-WBVolume [-Policy] <WBPolicy> [-Volume] <WBVolume> [-Confirm] [-WhatIf] [ <CommonParameters>]
Descripción detallada
The Remove-WBVolume cmdlet removes the WBVolume object from the WBPolicy object.
To use this cmdlet, you must be a member of the Administrators group or Backup Operators group.
Parámetros
-Policy<WBPolicy>
Specifies the WBPolicy object that contains the policy to update.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Volume<WBVolume>
Specifies the volume to remove from the policy contained in the WBPolicy object.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Confirm
Solicita confirmación antes de ejecutar el cmdlet.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-WhatIf
Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿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.
WBPolicy,WBVolume
The Remove-WBVolume cmdlet removes the WBVolume object from the policy contained in the WBPolicy object.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
WBVolume[]
The Remove-WBVolume cmdlet displays the list of WBVolume objects left in WBPolicy after the cmdlet removes the specified WBVolume object.
Notas
- The WBPolicy object must be in edit mode. To put the WBPolicy object in edit mode for a policy that you set as the scheduled backup policy, use the Get-WBPolicy cmdlet with the Editable parameter. The New-WBPolicy cmdlet creates a new WBPolicy object that is already in edit mode.
Ejemplos
Example 1: Remove a volume from the backup policy
This example removes the specified volume from the backup policy. The output is the list of volumes left in the WBPolicy object.
The first command stores the output of Get-WBPolicy in the variable named $Policy.
The second command stores the output of Get-WBVolume in the variable $Volume.
The third command uses Remove-WBVolume to remove the volumes in the variable $Volume from the backup policy object.
PS C:\> $Policy = Get-WBPolicy
PS C:\> $Volume = Get-WBVolume -VolumePath “E:”
PS C:\> Remove-WBVolume -Policy $Policy -Volume $Volume