Get-WBFile Spec

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.

Required Parameters

-Policy

Specifies the WBPolicy object that contains the backup policy for which to display backup file specifications.

Type: WBPolicy
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Aliases: cf
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.

Type: SwitchParameter
Aliases: wi
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs

WBPolicy

This cmdlet queries the WBPolicy object that contains the specified backup policy.

Outputs

WBFileSpec []

This cmdlet returns a list of WBFileSpec objects that contain backup file specifications for a WBPolicy object that contains a backup policy.