Remove-WBBackupSet
Remove-WBBackupSet
Deletes backups from a target catalog, a system catalog, or both.
Sintaxis
Parameter Set: Default
Remove-WBBackupSet [[-BackupSet] <WBBackupSet[]> ] [[-KeepVersions] <Int32> ] [[-DeleteOldest]] [[-MachineName] <String> ] [[-Force]] [ <CommonParameters>]
Parameter Set: NetworkWithPSCred
Remove-WBBackupSet [[-BackupSet] <WBBackupSet[]> ] [[-KeepVersions] <Int32> ] [[-DeleteOldest]] [-NetworkPath] <String> [[-Credential] <PSCredential> ] [[-NonInheritAcl]] [[-MachineName] <String> ] [[-Force]] [ <CommonParameters>]
Parameter Set: VolumePath
Remove-WBBackupSet [[-BackupSet] <WBBackupSet[]> ] [[-KeepVersions] <Int32> ] [[-DeleteOldest]] [-VolumePath] <String> [[-MachineName] <String> ] [[-Force]] [ <CommonParameters>]
Parameter Set: WBBackupTarget
Remove-WBBackupSet [[-BackupSet] <WBBackupSet[]> ] [[-KeepVersions] <Int32> ] [[-DeleteOldest]] [-BackupTarget] <WBBackupTarget> [[-MachineName] <String> ] [[-Force]] [ <CommonParameters>]
Descripción detallada
The Remove-WBBackupSet cmdlet deletes a set of backups from a target catalog, a system catalog, or both.
Parámetros
-BackupSet<WBBackupSet[]>
Specifies an array of backup set objects that determine which backup or which backup sets to delete. You can specify one backup or an array of backup sets.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-BackupTarget<WBBackupTarget>
Specifies a backup target object that indicates the storage location with the backups that you want to delete.
Use this parameter to delete backups from computers other than the local computer. The cmdlet deletes the backup sets from the catalog on the computer that you specify in this parameter and from the system catalog of the local computer. These locations can be locally attached disk drives or remote shared folders.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
4 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Credential<PSCredential>
Specifies a PSCredential object that contains the username and password for a user account that has access permissions for the location that stores backups.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
5 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-DeleteOldest
Indicates that the cmdlet deletes the oldest backup in the set.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
3 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Force
Indicates that the cmdlet removes the backup set without prompting you for confirmation. By default, the cmdlet prompts you for confirmation before it proceeds.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
8 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-KeepVersions<Int32>
Specifies the number of the most recent backups to keep on the backup target. The cmdlet deletes backups over this number from the target.
If you specify this parameter along with the BackupTarget and MachineName parameters, the cmdlet examines the target location on the specified computer for backups to remove.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-MachineName<String>
Specifies the name of the computer for which you want to delete backups.
Use this parameter when you specify the BackupTarget parameter or when multiple computers store backups in the same location.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
7 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-NetworkPath<String>
Specifies the path to the remote shared folder from which the cmdlet deletes backups.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
4 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-NonInheritAcl
Do not use. This parameter is not implemented in this version of the module.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
6 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-VolumePath<String>
Specifies the drive letter of the volume where the cmdlet stores backups.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
4 |
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.
- Windows.ServerBackup.Commands.WBBackupSet,System.Int32,System.Management.Automation.SwitchParameter, Windows.ServerBackup.Commands.WBBackupTarget, System.String, System.Management.Automation.PSCredential
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
- Windows.ServerBackup.Commands.WBBackupSet
Ejemplos
Example 1: Remove oldest backup set
This command deletes the oldest backup of the computer that has its name in the $MachineName variable from the backup target. Because the command includes the Force parameter, it does not ask for confirmation of the deletion.
PS C:\> $Ret = Remove-WBBackupSet -DeleteOldest -BackupTarget $WB_BackupTarget -MachineName $MachineName -Force