Get-SmJob

Detailed Description

The Get-SmJob cmdlet is used to view the parameters of a job that has been created. You have enormous power to filter for job statistics, and even per item statistics.

Syntax

 Get-SmJob 
[[-JobId] <int[]>] 
[[-BatchId] <int[]>] 
[[-JobStatuses] {Created | Authenticating | Discovery | Processing | Throttled | OnHold | Complete | CompleteWithErrors | Failed | Cancelled | Deleted}]
[[-Sources] {PSTFile | Exchange | ExchangePubFolders | EnterpriseVault 
| EnterpriseVaultFileSystemArchiving | FilesMsg | FilesEml | EmailXTender | ZantazEAS | ArchiveManager 
| Metalogix | OneDrive | OneDriveBusiness | FileSystem | Dropbox | BoxNet | Job | GMail | GoogleDrive 
| SharePointLibrary | Discovery}]
[[-Targets] {PSTFile | Exchange | ExchangePubFolders | EnterpriseVault | FilesMsg | FilesEml | Mimecast | OneDrive 
| OneDriveBusiness | ReportOnly | Delete | FileSystem | Dropbox | BoxNet | Job | GMail | GoogleDrive | SharePointLibrary}]
[[-RehydrationTypes] {EmailXtender | Zantaz | EnterpriseVault}] 
[[-SourceInput] <string>]
[[-TargetOutput] <string>] 
[[-ShowEntries]] 
[[-ItemStatuses] {Discovered | Existing | Inprogress | Complete | Failed | FailedPerm | Skippped}] 
[[-ShowFolders]] 
[[-FolderStatuses] {Discovered | InProgress | Skipped | Complete | Failed | Deleted | Created | Existing}] [[-FolderJobPart] {Source | Target}] [[-Tags] <string>]
[[-IncludeDeleted]]  [<CommonParameters>]

Parameters

-BatchId <int[]>
    Specify BatchIds

    Required? false
    Position? 1
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-FolderJobPart 
    Specify Folder Job Part (Source/Target)

    Required? false
    Position? 12
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-FolderStatuses <FolderStatus[]>
    Specify Folder Statuses

    Required? false
    Position? 11
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-IncludeDeleted
    Include Deleted Jobs in the output

    Required? false
    Position? 14
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-ItemStatuses <ItemStatus[]>
    Specify Item Statuses

    Required? false
    Position? 9
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-JobId <int[]>
    Specify JobIds

    Required? false
    Position? 0
    Accept pipeline input? true (ByValue)
    Parameter set name (All)
    Aliases None
    Dynamic? false

-JobStatuses <JobStatus[]>
    Specify Job Statuses

    Required? false
    Position? 2
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-RehydrationTypes <RehydrationType[]>
    Specify Rehydration Type

    Required? false
    Position? 5
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-ShowEntries
    Return the Entries in each Job retrieved.

    Required? false
    Position? 8
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-ShowFolders
    Return the Folders in each Job retrieved.

    Required? false
    Position? 10
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-SourceInput 
    Specify Source Input e.g. the mailbox or user

    Required? false
    Position? 6
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-Sources <Source[]>
    Specify Source(s)

    Required? false
    Position? 3
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-Tags 
    Find jobs with any of these tags in a comma-separated list

    Required? false
    Position? 13
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-Targets <Target[]>
    Specify Target(s)

    Required? false
    Position? 4
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

-TargetOutput 
    Specify Target Output e.g. the mailbox or user

    Required? false
    Position? 7
    Accept pipeline input? false
    Parameter set name (All)
    Aliases None
    Dynamic? false

<CommonParameters>
    This cmdlet supports the common parameters: Verbose, Debug,
    ErrorAction, ErrorVariable, WarningAction, WarningVariable,
    OutBuffer, PipelineVariable, and OutVariable. For more information, see
    about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Examples

Get-SmJob is used to retrieve jobs and display their configuration information, status, and many additional details.
An example how to get information about a specific job;

PS C:\Simply Migrate> Get-SmJob -JobId 1
JobId               : 1
BatchId             : 1
JobStatus           : Complete
StatusMessage       :
Priority            : 10
PercentComplete     : 100
TimeStarted         : 10/12/2016 9:10:00 AM
TimeFinished        : 10/12/2016 9:40:00 AM
SourceMailbox       : E:\Folder_Full_Of_EML_Files
TargetMailbox       : user@domain.com.pst
Source              : FilesEml
Target              : PSTFile
DateFrom            : 1/1/1900 12:00:00 AM
DateTo              : 1/2/2100 12:00:00 AM
ItemsTotal          : 65685
ItemsFailed         : 0
ItemsRemaining      : 0
FailedCount         : 0
JobCreatedBy        : doug.pecarski
JobModifiedBy       :
JobCreated          : 10/12/2016 9:10:00 AM
JobModified         :
ProcessingInBatch   :
ProcessingOnMachine :
ProcessingRate      : 92
ProcessingItems     : 152
LastUpdate          : 10/12/2016 9:31:12 PM
SMVersion           : 4.1.0.3587
SourceType          : {"srcfiles":"E:\\Folder_Full_Of_EML_Files"}
TargetType          : {"targpst":"F:\\Data\\user@domain.com.pst","rootfolder":"Inbox","targpstsize":"3192"}
StatusDate          : 10/12/2016 9:31:12 PM
RehydrationType     :
Config              : ...
JobConfig           : SimplyMigrate.Core.JobConfig
SourceParams        : {[srcfiles, E:\Folder_Full_Of_EML_Files]}
TargetParams        : {[targpst, F:\Data\user@domain.com.pst], [rootfolder, Inbox], [targpstsize, 3192]}
Entries             :

An example about how to get information about a specific Job Status and Source Data Type;

PS C:\Simply Migrate> Get-SmJob -JobStatuses Complete -Sources PSTFile

The Above cmdlet will return all jobs, where PSTFile was the Source data type, and where the Job has Completed.

ShowEntries. Because it's worth a heading.

There are many filters you can apply to the Get-SmJob cmdlet.  One of the more powerful parameters is ShowEntries.  Bundled with the –ItemStatuses parameter it give you power to understand the items you are working with.

An example shown here, will get all items marked as Complete, from all jobs in BatchId 9.

$items = Get-SmJob -batchid 9 -ShowEntries -ItemStatuses Complete

The above will result in the $items variable containing all jobs from BatchID 9, but we now have populated the Entries member.  To Access our Items, we perform the following cmdlet.

Note: This example is from an Enterprise Vault shortcut rehydration report and has been limited to a single item being shown for brevity.

PS C:\Program Files\Simply Migrate> $items.Entries

EntryId : 0baa84a5-1364-4ced-07ea-08d60cde3ebd
JobId : 252
ItemStatus : Complete
Mailbox : 1E0F929447B93AA4DA8FFD03F2BDDF4B01110000evserver1
MsgId : 201808285453101~201808121211090000~Z~7037C013122C3B38D3D69DC7FABBC8E1
DateCreated : 8/28/2018 12:03:30 PM
Folder : Inbox
Subject : Undermine sullied disproof contemn ebullient imminent recast inured dynamo
Author : Ingram, Hollie
Recipients : McCarthy, Emma; Hammond, Sean; Heath, Joe; Connolly, Scarlett; King, Callum; Bates, Joel; Fowler, Gracie; grp_group1; Hall, Joseph; Owens,
Muhammad; Owen, Harrison; Carpenter, Lola; Connor, Lilly
ReceivedDate : 8/12/2018 1:11:09 PM
Size : 13062
MessageId : <5D8EE2BFB5D27C4AB7B25C34E83A6134E41CB4@smlabex.SimplyMigrate.me>
MessageClass : IPM.Note.EnterpriseVault.Shortcut
ItemType :
Owner :
FileName :
DateModified :
StatusMessage :
TempDataFile :
UnRead : False
MailItemEnumerated : False
DiscoveryDate :
Path :
Name :
FolderCount : 0
MessageCount : 0
EmailCount : 0
CalendarCount : 0
TaskCount : 0
ContactCount : 0
OtherCount : 0
Owner1 :
Owner2 :
Owner3 :
OriginalId : AAMkADA0Y2IwMTIwLTU3NjMtNGQ5MC04ZjZhLTA1ODhmNzJhNTQxNQBGAAAAAADs3T0Jp5lWTIT45d7+WnNvBwAx4m8TqwZkTq6M2OjznflOAAAAlsYvAAAx4m8TqwZkTq6M2OjznflOAAAF
Ng1FAAA=
FolderId :
FailedCount : 0
StatusDate :
HashBytes :
ExtraData : { "OriginalSize": 13062 }
Position :
StartDate :
EndDate :
TargetRoot :
TargetFolderId :
TargetItemId :
Data :
Properties :
JobHistory :

As you can see, there is a wealth of information about every item Simply Migrate discovers.
If an item fails to migrate, the item status is shown against that item, while all available metadata about that object is also shown.