Remove-WBFileSpec
Remove-WBFileSpec
Removes a backup file specification from a backup policy.
Sintaxis
Parameter Set: Default
Remove-WBFileSpec [-Policy] <WBPolicy> [-FileSpec] <WBFileSpec> [-Confirm] [-WhatIf] [ <CommonParameters>]
Descripción detallada
The Remove-WBFileSpec cmdlet removes a WBFileSpec object that contains a backup file specification from a WBPolicy object that contains a backup policy. A backup file specification contains a list of items to include in or exclude from backups that use the backup policy.
Before you can remove a backup file specification from a WBPolicy object, you must put the WBPolicy object 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.
To use this cmdlet, you must be a member of the Administrators group or Backup Operators group.
Parámetros
-FileSpec<WBFileSpec>
Specifies a backup file specification object to remove from the WBPolicy object.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-Policy<WBPolicy>
Specifies a backup policy object that contains the backup policy to update.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿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.
WBFileSpec, WBPolicy
The Remove-WBFileSpec cmdlet removes a WBFileSpec object from a WBPolicy object.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
None
None
Ejemplos
Example 1: Remove a backup file specification from a backup policy
This example removes a backup file specification from a backup policy.
The first command gets a list of the backup file specifications from the backup policy in the variable named $Policy. The command assigns the backup file specifications to the array in the variable named $Filespeclist.
The second command removes the backup file specification in the first element of $Filespeclist from the policy in $Policy.
PS C:\> $Filespeclist = Get-WBFileSpec -Policy $policy
PS C:\> Remove-WBFileSpec -Policy $policy -FileSpec $Filespeclist[1]