Condividi tramite


Remove-OBPolicy

Remove-OBPolicy

Removes the currently set backup policy (OBPolicy object).

Syntax

Parameter Set: Default
Remove-OBPolicy [-Policy] <CBPolicy> [[-DeleteBackup]] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-OBPolicy cmdlet removes the currently set backup policy (OBPolicy object). This stops the existing scheduled daily backups. If the DeleteBackup parameter is specified, then any data backed up according to this policy on the server is deleted. If the DeleteBackup parameter is not specified, the existing backups are retained in accordance with the retention policy in effect when the backup was created.

This cmdlet supports the WhatIf and the Confirm parameters. The cmdlet prompts the user for confirmation by default. The WhatIf parameter gives a verbose description of what the cmdlet does without performing any operation. The Confirm parameter specifies whether the cmdlet should prompt the user. Specify –Confirm:$FALSE to override the prompt.

Parameters

-DeleteBackup

Specifies that all data backed up on the server associated with this policy should be deleted immediately.

Aliases

none

Required?

false

Position?

3

Default Value

true

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Policy<CBPolicy>

Specifies the policy to be removed.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Internal.CloudBackup.Commands.OBPolicy

Examples

EXAMPLE 1

This example deletes an existing policy.

PS C:\> Get-OBPolicy | Remove-OBPolicy

Get-OBPolicy