Get-WBJob

Get-WBJob

Gets the currently running backup operation (WBJob object).

Syntax

Get-WBJob [[-Previous] <Unsigned Int>] [<CommonParameters>]

Detailed Description

The Get-WBJob cmdlet gets the currently running or previous backup operation (WBJob object).

Parameters

-Previous <Unsigned Int>

When this parameter is specified the previous backup operations are queried from the backup events in the event manager.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

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 start a backup, use the Start-WBBackup cmdlet.

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

Examples

EXAMPLE 1

C:\PS>Start-WBBackup -Policy $policy -Async 
$job = Get-WBJob

WBJob object for the currently running backup operation.

Description

-----------

Gets the status of the current running backup operation. After the operation ends, you can get the status using: Get-WBJob -Previous 1

EXAMPLE 2

C:\PS>$jobs = Get-WBJob -Previous 10

The last ten backup operations (WBJob objects).

Description

-----------

Gets the status of the last ten backup jobs from the backup events in the event manager.

See Also

Reference

Start-WBBackup