Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds the OBFileSpec object, which specifies the items to include or exclude from a backup, to the backup policy (OBPolicy object).
Parameter Set: Default
Add-OBFileSpec [-Policy] <CBPolicy> [-FileSpec] <CBFileSpec[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
The Add-OBFileSpec cmdlet adds the OBFileSpec object, which specifies the items to include or exclude from a backup, to the backup policy (OBPolicy object). The OBFileSpec object can include or exclude multiple files, folders, or volumes. The list of items to include can be defined by using the New-OBFileSpec cmdlet and then update the OBPolicy object using this cmdlet. The Add-OBFileSpec cmdlet supports WhatIf and Confirm parameters with a low impact. The low 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.
Specifies the OBFileSpec object to add to the backup policy.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
Specifies the backup policy (OBPolicy object) to update.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
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 |
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The input type is the type of the objects that you can pipe to the cmdlet.
- None
The output type is the type of the objects that the cmdlet emits.
- Microsoft.Internal.CloudBackup.Commands.OBPolicy
This example adds a file specification.
PS C:\> $policy = Get-OBPolicy
New-OBFileSpec -FileSpec "C:\testdata" –NonRecursive | Add-OBFileSpec -Policy $policy
This example adds a file specification.
PS C:\> $fspec = New-OBFileSpec -FileSpec C:\testdata –NonRecursive
PS C:\> New-OBPolicy | Add-OBFileSpec -FileSpec $fspec