Changing Discovery ownership with Powershell

With Simply Migrate, PST Discovery and Migration is really… well, simple.  During Discovery we even extrapolate the three most likely owners of each PST file we find.  However, occasionally we can’t identify the owner or in some cases you may want to override the owner we’ve identified.

We’ve now introduced a new Powershell cmdlet that allows you to control the owner for discovered PST files, you can use one of the 3 potential owners we’ve found or set the owner to a custom string.

Set-SMEntryOwner

NAME
 Set-SMEntryOwner
 
SYNTAX
 Set-SMEntryOwner [-Entry] <JobEntry> [-Owner1] [<CommonParameters>]
 
 Set-SMEntryOwner [-Entry] <JobEntry> [-Owner2] [<CommonParameters>]
 
 Set-SMEntryOwner [-Entry] <JobEntry> [-Owner3] [<CommonParameters>]
 
 Set-SMEntryOwner [-Entry] <JobEntry> [-Custom <string>] [<CommonParameters>]
 
 Set-SMEntryOwner [-EntryId] <string> [-Owner1] [<CommonParameters>]
 
 Set-SMEntryOwner [-EntryId] <string> [-Owner2] [<CommonParameters>]
 
 Set-SMEntryOwner [-EntryId] <string> [-Owner3] [<CommonParameters>]
 
 Set-SMEntryOwner [-EntryId] <string> [-Custom <string>] [<CommonParameters>]

Examples

// Get a job, including all Entries
$job = Get-SMJob -JobId 1043 -ShowEntries

// Get the first entry
$entry = $job.Entries[0]

// Set the Owner to be the value of Owner1
Set-SMEntryOwner -Entry $entry -Owner1

// Set the Owner to be a custom value
Set-SMEntryOwner -Entry $entry -Custom firstname.lastname

// Clear the owner
Set-SMEntryOwner -Entry $entry -Custom $null

// Set the owner using an Entry Id
Set-SMEntryOwner -EntryId $entry.EntryId -Owner2

N.B. For more awesome ways you can select and filter Job Entries see Getting your geek on with Get-SMJob (Part 1)

Output

In all cases if the change of ownership has been successful the updated Job Entry will be returned.

PS Z:\> Set-SMEntryOwner -EntryId EAC2A002-8A09-4224-518E-08D471D5D32D -Custom john.smith@simplymigrate.com


EntryId            : eac2a002-8a09-4224-518e-08d471d5d32d
JobId              : 1043
ItemStatus         : Complete
Mailbox            :
MsgId              :
DateCreated        : 3/23/2017 10:17:35 AM
Folder             :
Subject            :
Author             :
Recipients         :
ReceivedDate       :
Size               : 395166720
MessageId          :
MessageClass       :
ItemType           :
Owner              : john.smith@simplymigrate.com
FileName           :
DateModified       :
StatusMessage      :
TempDataFile       :
UnRead             : False
MailItemEnumerated : False
DiscoveryDate      : 3/23/2017 11:17:35 AM
Path               : R:\Temp\aaa.pst
Name               : Personal Folders
FolderCount        : 13
MessageCount       : 2082
EmailCount         : 1562
CalendarCount      : 60
TaskCount          : 0
ContactCount       : 210
OtherCount         : 250
Owner1             : joe.bloggs@simplymigrate.com
Owner2             : jane.doe@simplymigrate.com
Owner3             : john.doe@simplymigrate.com
OriginalId         :
FolderId           : 1692
FailedCount        : 0
StatusDate         : 3/23/2017 11:19:26 AM
HashBytes          :
ExtraData          :
JobHistory         :

  1 Comment   Comment

Leave a Comment