Remove-WBPolicy

Remove-WBPolicy

Removes the backup policy.

Sintaxis

Parameter Set: Default
Remove-WBPolicy [[-Policy] <WBPolicy> ] [-All] [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Remove-WBPolicy cmdlet removes the WBPolicy object. This cmdlet stops scheduled daily backups from running. If the backup storage location is a disk, the cmdlet frees the disk. If the system does not have a scheduled backup, the cmdlet does not do anything.

To use this cmdlet, you must be a member of the Administrators group or Backup Operators group.

Parámetros

-All

Indicates that this cmdlet removes the WBPolicy object that is set in the system.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Force

Removes a policy without prompting you for confirmation. By default, the cmdlet prompts you for confirmation before it proceeds.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Policy<WBPolicy>

Specifies the backup policy object to update.

Alias

ninguno

¿Requerido?

false

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (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

    This cmdlet specifies the WBPolicy object to remove.

Salidas

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

  • None

Notas

  • The WBPolicy object must be in edit mode. To put the WBPolicy object in edit mode for a policy that is set as the scheduled backup policy, use the Get-WBPolicy cmdlet with the Editable parameter. The New-WBPolicy cmdlet creates a WBPolicy object that is already in edit mode.

Ejemplos

Example 1: Remove all scheduled backups

This command removes the currently set WBPolicy object and disables all scheduled backups on the system. The command also uses the Force parameter to suppress the confirmation message.

PS C:\> Remove-WBPolicy -All -Force

Example 2: Remove a specified backup policy

This command store the result of the Get-WBPolicy cmdlet in the variable named $Policy, then removes the WBPolicy object, which disables all scheduled backups on the system.

PS C:\> $Policy = Get-WBPolicy
PS C:\> Remove-WBPolicy -Policy $Policy

Temas relacionados

Get-WBPolicy

New-WBPolicy

Set-WBPolicy