Edit

Share via


Get-WBSchedule

Gets the current schedule for backups.

Syntax

Default (Default)

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

Description

The Get-WBSchedule cmdlet gets 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 cmdlet, you must be a member of the Administrators group or Backup Operators group.

Examples

Example 1: Get the scheduled backup times

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

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.

Parameters

-Policy

Specifies the WBPolicy object to display.

Parameter properties

Type:WBPolicy
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
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.

Inputs

Microsoft.Windows.ServerBackup.Commands.WBPolicy

Outputs

Object