Get-WBFileSpec
Gets the list of backup file specifications associated with a backup policy.
Syntax
Default (Default)
Get-WBFileSpec
[-Policy] <WBPolicy>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Get-WBFileSpec cmdlet gets the list of WBFileSpec objects that contain backup file specifications for a WBPolicy object that contains a backup policy. A WBFileSpec object defines the items to include in or exclude from backups that you create by using the backup policy.
Use the New-WBFileSpec and Add-WBFileSpec cmdlets to define and apply changes to the backup policy.
To use this cmdlet, you must be a member of the Administrators group or Backup Operators group.
Examples
Example 1: Get backup file specifications for a backup policy
PS C:\> $Filespeclist = Get-WBFileSpec -Policy $Policy
This command gets the list of file specifications in the WBPolicy object in the variable named $Policy and assigns them to the $Filespeclist array.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Policy
Specifies the WBPolicy object that contains the backup policy for which to display backup file specifications.
Parameter properties
| Type: | WBPolicy |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.