Get-WBSchedule

Get-WBSchedule

Retrieves the current schedule for backups.

Syntax

Parameter Set: Default
Get-WBSchedule [-Policy] <WBPolicy> [ <CommonParameters>]

Detailed Description

The Get-WBSchedule cmdlet retrieves the current schedule for backups in the WBPolicy object. Backups run daily at the times specified in the schedule. To change the schedule, use the Set-WBSchedule cmdlet.

To use this or any other Windows Server 2012 Backup cmdlets, you must be a member of the Administrators group or Backup Operators group.

Parameters

-Policy<WBPolicy>

Specifies the WBPolicy object to display.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

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

  • WBPolicy

    The Get-WBSchedule cmdlet queries a specified WBPolicy object.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Datetime []

    The Get-WBSchedule cmdlet displays the list of Datetime objects in the WBPolicy object.

Examples

Example 1: Get the scheduled backup times

This example gets the scheduled backup times from the WBPolicy object.

The first command stores the result of the Get-WBPolicy in the variable named $Policy.

The second command gets the backup schedule from the backup policy object.

PS C:\> $Policy = Get-WBPolicy
PS C:\> Get-WBSchedule -Policy $Policy

New-WBPolicy

Set-WBSchedule