Remove-OBFileSpec
Remove-OBFileSpec
Removes the list of items to include or exclude from a backup, as specified by the OBFileSpec object, from a backup policy (OBPolicy) object.
Syntax
Parameter Set: Default
Remove-OBFileSpec [-Policy] <CBPolicy> [-FileSpec] <CBFileSpec[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Remove-OBFileSpec cmdlet removes the list of items to include or exclude from a backup, as specified by the OBFileSpec object, from a backup policy (OBPolicy object). After making changes to the policy object, Set-OBPolicy must be called to set this policy as the current one.
This cmdlet supports WhatIf and Confirm parameters with a medium impact. The medium impact signifies that the cmdlet will not prompt the user by default. The WhatIf parameter gives a verbose description of what the cmdlet does. The Confirm parameter specifies whether the cmdlet should prompt the user. Using –Confirm:$FALSE will override the prompt.
.
Parameters
-FileSpec<CBFileSpec[]>
Specifies the items to remove from the OBPolicy object.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-Policy<CBPolicy>
Specifies the policy from which the file specification should be deleted.
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 removes an existing file specification.
PS C:\> $policy = Get-OBPolicy
PS C:\> Get-OBFileSpec -Policy $policy | Remove-OBFileSpec -Policy $policy