Get-WBJob

Windows Server 2012 R2 and Windows 8.1

Get-WBJob

Gets the current backup operation.

구문

Parameter Set: Default
Get-WBJob [[-Previous] <UInt32> ] [ <CommonParameters>]




자세한 설명

The Get-WBJob cmdlet gets the current backup operation (if one is running) or the previous backup or recovery operation. A WBJob object contains the backup or recovery operation.

To start a backup, use the Start-WBBackup cmdlet.

To use this cmdlet, you must be a member of the Administrators group or Backup Operators group.

매개 변수

-Previous<UInt32>

Specifies the number of previous backup operations for which the server queries the event manager.


별칭

없음

필수 여부

false

위치

1

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(http://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • Previous

    If you use the Previous parameter, the Get-WBJob cmdlet queries a WBJob object for previously run backups and recoveries. If you do not use this parameter, the cmdlet returns a WBJob object that contains the currently running backup or recovery operation.


출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • WBJob[]

    The Get-WBJob cmdlet displays a WBJob object that contains the currently or previously running backup or recovery operation.


예제

Example 1: Get backup status

This example gets the status of the currently running backup or recovery operation.

The first command gets a backup policy object that contains the backup policy for the current computer and stores this policy in the variable named $Policy.

The second command starts the backup job by using the policy in the variable named $Policy. Because the command uses the Async parameter, the backup job does not display status messages as it runs.

The third command gets status information about the backup job and assigns it to the variable named $Job. Because the previous command specified the Async parameter, you can use the Get-WBJob cmdlet to obtain this information.


PS C:\> $Policy = Get-WBPolicy
PS C:\> Start-WBBackup -Policy $Policy -Async
PS C:\> $Job = Get-WBJob

Example 2: Get the status of past backup or recovery jobs

This command gets the status of the last 10 backup or recovery jobs from the backup events in the event manager. It then stores the status in the variable named $Jobs.


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

관련 항목

커뮤니티 추가 항목

추가
표시: