Disable-WssBackupPolicy

Disables and removes a scheduled server backup policy.

Syntax

Disable-WssBackupPolicy
       [-BackupPolicy] <ScheduledBackupPolicy>
       [-Force]
       [-PassThru]
       [-Confirm]
       [-WhatIf]

Description

The Disable-WssBackupPolicy cmdlet disables and removes a scheduled server backup policy. When you disable a scheduled server backup policy, the scheduled daily backups in the backup policy do not run.

Examples

Example 1: Remove a scheduled server backup policy

PS C:\>$ContosoBUPolicy25 = Get-WssBackupPolicy PS C:\> Disable-WssBackupPolicy -BackupPolicy $ContosoBUPolicy25

This example disables and removes a scheduled server backup policy.

The first command gets the backup policy for the computer and stores the result in the $ContosoBUPolicy25 variable

The second command disables and removes the backup policy stored in $ContosoBUPolicy25.

Parameters

-BackupPolicy

Specifies the scheduled backup policy to disable and remove.

Type:ScheduledBackupPolicy
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Indicates that the cmdlet creates an object that you can use in a pipeline. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False