Get-WBFileSpec

Get-WBFileSpec

Gets the list of WBFileSpec objects associated with the specified backup policy (WBPolicy object).

Syntax

Get-WBFileSpec [-Policy] <WBPolicy> [<CommonParameters>]

Detailed Description

The Get-WBFileSpec cmdlet gets the list of WBFileSpec objects associated with the specified backup policy (WBPolicy object). The WBFileSpec objects define what items will be included or excluded from backups created using the backup policy. Use the New-WBFileSpec and Add-WBFileSpec cmdlets to define and apply changes to the backup policy.

Parameters

-Policy <WBPolicy>

Specifies the backup policy (WBPolicy object) to display information for.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByValue)

Position?

1

-CommonParameter

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Notes

  • To use Windows Server Backup cmdlets, you must be a member of the Administrators group or Backup Operators group.

Examples

EXAMPLE 1

C:\PS>$filespeclist = Get-WBFileSpec -Policy $policy

A list of file specs in the WBPolicy object.

Description

-----------

Gets the list of file specs in the WBPolicy object $policy in the array $filespeclist.

See Also

Reference

Add-WBFileSpec
New-WBPolicy
Remove-WBFileSpec