Remove-WssBackupTarget
Removes a backup target from a scheduled backup policy.
Syntax
Remove-WssBackupTarget
[-BackupPolicy] <ScheduledBackupPolicy>
[-BackupTarget] <BackupTarget>
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.
Examples
Example 1: Remove a backup target from a policy
PS C:\>$ContosoBUPolicies10 = Get-WSSBackupPolicy PS C:\>$ContosoBUTarget = Get-WssBackupTarget -BackupPolicy $ContosoBUPolicies10[9] PS C:\>Remove-WssBackupTarget -BackupPolicy $ContosoBUPolicy10[9] -BackupTarget $ContosoBUTarget
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].
Parameters
-BackupPolicy
Specifies the scheduled backup policy from which to remove the backup target.
Type: | ScheduledBackupPolicy |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BackupTarget
Specifies the name of the backup target to remove.
Type: | BackupTarget |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for