Remove-WssBackupTarget
Remove-WssBackupTarget
Removes a backup target from a scheduled backup policy.
Syntax
Parameter Set: Default
Remove-WssBackupTarget [-BackupPolicy] <ScheduledBackupPolicy> [-BackupTarget] <BackupTarget> [ <CommonParameters>]
Detailed Description
The Remove-WssBackupTarget cmdlet removes a backup target from a scheduled backup policy. A scheduled backup policy is a backup file specification that has a backup schedule associated with it. If you remove a backup target from a scheduled backup policy, backups that use the policy no longer back up the files and volumes that the target specifies.
Parameters
-BackupPolicy<ScheduledBackupPolicy>
Specifies the scheduled backup policy from which to remove the backup target.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-BackupTarget<BackupTarget>
Specifies the name of the backup target to remove.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
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.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Remove a backup target from a policy
This example removes a backup target from a backup policy.
The first command gets the current backup policies and stores them in the variable named $ContosoBUPolicies10.
The second command gets the backup target for the tenth policy in the $ContosoBUPolicies10 array, and then stores the backup target in the variable named $ContosoBUTarget.
The third command removes the backup target that is stored in $ContosoBUTarget from the policy stored in $ContosoBUPolicies10[9].
PS C:\> $ContosoBUPolicies10 = Get-WSSBackupPolicy
PS C:\> $ContosoBUTarget = Get-WssBackupTarget -BackupPolicy $ContosoBUPolicies10[9]
PS C:\> Remove-WssBackupTarget -BackupPolicy $ContosoBUPolicy10[9] -BackupTarget $ContosoBUTarget