Get-WBFileSpec
Gets the list of backup file specifications associated with a backup policy.
Syntax
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.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Policy
Specifies the WBPolicy object that contains the backup policy for which to display backup file specifications.
Type: | WBPolicy |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.Windows.ServerBackup.Commands.WBPolicy