Use this cmdlet to list one or more of the most recent log entries from a specific log file produced by Super-ExMerge.
PowerShell | ParameterSet: "Count"
Get-LogEntries
- -LogFile
- [-Count]
PowerShell | ParameterSet: "All"
Get-LogEntries
- -LogFile
- [-All]
Description
Use the Get-LogEntries cmdlet to retrieve log entries for a specific log file.
Super-ExMerge produces several log files. The service itself maintains a log of its activities such as startup and shutdown. Each sync task, when executing, produces a log file as well. The list of available log files can be retrieved using the Get-LogFiles cmdlet.
Get-LogEntries will output the log entries sorted by each entry’s timestamp, with the most recent event at the start of the list. If the listed entries are desired to be shown with the most recent entry at the bottom, use the Sort-Object cmdlet to sort by the timestamp property.
Log files produced by Super-ExMerge are standard service trace logs and are associated with the Microsoft SVC Trace Log Viewer application. As such, the log files can also be viewed and analyzed using a windows GUI tool, which is installed along with Super-ExMerge.
Log files are located in %Public%\Documents\Priasoft\SuperExMerge. This location can be changed using the SyncLoggingPath registry attribute in HKLM\Software\Priasoft\SuperExMerge\ServiceSettings.
Examples
Example 1
PowerShell
Get-LogFiles -Name joe@source.com | Get-LogEntries Log TimeStamp EventTypeName Message --- --------- -------- ------- Mailbox-to-PST\joe@source.com 6/24/2019 5:59:47 PM Information Synchronization session completed:... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:35 PM Information [CCA] Content Change Analysis completed for Ar... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:35 PM Information Content analysis completed for: Archive Mailbox-to-PST\joe@source.com 6/24/2019 5:56:32 PM Information Starting source to destination comparison of: ... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:32 PM Information Starting item change analysis of: Archive Mailbox-to-PST\joe@source.com 6/24/2019 5:56:32 PM Information [CCA] Contents Change Analysis starting for Ar... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information Starting contents enumeration of: Archive Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information [CCA] Content Change Analysis completed for Ar... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information Content analysis completed for: Archive\OlderS... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information Starting source to destination comparison of: ...
This example retrieves a log file for ‘joe@source.com’ and send the log to Get-LogEntries which, by default, will output the most recent 10 log entries, sorted with the most recent entry at the top of the list.
Example 2
PowerShell
Get-LogFiles -Name joe* | Get-LogEntries -Count 15 | Sort TimeStamp Log TimeStamp EventTypeName Message --- --------- -------- ------- Mailbox-to-PST\joe@source.com 6/24/2019 5:56:29 PM Information Starting contents enumeration of: Archive\Olde... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:29 PM Information [CCA] Content Change Analysis completed for Cl... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:29 PM Information Content analysis completed for: Clutter Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information Starting item change analysis of: Archive\Olde... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information [CCA] Contents Change Analysis starting for Ar... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information [CCA] Content Change Analysis completed for Ar... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information Content analysis completed for: Archive\OlderS... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information Starting source to destination comparison of: ... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:30 PM Information Starting contents enumeration of: Archive Mailbox-to-PST\joe@source.com 6/24/2019 5:56:32 PM Information Starting item change analysis of: Archive Mailbox-to-PST\joe@source.com 6/24/2019 5:56:32 PM Information [CCA] Contents Change Analysis starting for Ar... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:32 PM Information Starting source to destination comparison of: ... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:35 PM Information [CCA] Content Change Analysis completed for Ar... Mailbox-to-PST\joe@source.com 6/24/2019 5:56:35 PM Information Content analysis completed for: Archive Mailbox-to-PST\joe@source.com 6/24/2019 5:59:47 PM Information Synchronization session completed:...
This example uses a wildcard pattern to select the log file for joe@source.com. It then passes the result to Get-LogEntries and requests the last 15 log entries, then sorts the output by the TimeStamp property so that the most recent entry is at the bottom of the resulting list.
Example 3
PowerShell
Get-LogFiles -Name joe* | Get-LogEntries -Count 1 | select *
Log : Mailbox-to-PST\joe@source.com
EventID : 3402045202
EventTypeName : Information
EventType : 8
TimeStamp : 6/24/2019 5:59:47 PM
Source : Main
ProcessName : MapiDataSync32
Computer : DEVBRIX-IQ
Message : Synchronization session completed:
Source Folders Enumerated: 46
Source Folders Analyzed: 46
Source Folders Created: 0
Source Folders Deleted: 0
Source Folders Skipped: 0
Source Folders Skipped (Unsupported): 23
Source Folders Updated: 0
Target Folders Enumerated: 16
Target Folders Analyzed: 16
Target Folders Created: 0
Target Folders Deleted: 0
Target Folders Skipped: 0
Target Folders Skipped (Unsupported): 0
Target Folders Updated: 0
Source Items Enumerated: 24,870
Source Items Analyzed: 24,870
Source Items Copied To Target: 2,243
Source Items Copy Verified: 2,216
Source Items Updated in Target: 0
Target Items Deleted due to Source Deletion: 0
Target Items Enumerated: 109
Target Items Analyzed: 111
Target Items Copied To Target: 0
Target Items Copy Verified: 0
Target Items Updated In Source: 0
Source Items Deleted due to Target Deletion: 0
Total Items to Process: 24,870
Total Items Processed: 2,349
Total Items with No Changes: 106
Total Items Skipped: 0
Total Items Failed: 0
Total Calendar Items Fixed: 0
This example retrieves the log file for joe@source.com and gets the most recent log entry and then uses Select-Object * to list all the properties of the log entry.
This example shows that the state of the sync is completed/exited and a statistics report has been produced and shown.
Parameters
-LogFile
The LogFile parameter specifies the log file from which to show log entries. The LogFile parameter can be converted from a string value that represents the full file system path to the log file, or can be a System.IO.FileInfo object of the same.
As the examples above show, the Get-LogFiles cmdlet will return a FileInfo object in its output that can be piped to the Get-LogEntries cmdlet.
-Count
The Count parameter specifies the number of log entries to return. If this parameter is not supplied, the default value is ten (10).
-All
The All switch parameter specifies that all log entries for the specified log file should be returned. Note that if the log file is large, the cmdlet may take several seconds to enumerate all the log entries. Furthermore, if Sort-Object is used, as in the example above, the entire set of log entries has to be retrieved first before the sort can occur.
Output
This cmdlet will place one or more PSObject objects on the pipeline. The default property set returned is: Log, TimeStamp, EventTypeName, Message.
Each log entry object has the following properties:
| Log | The name and type of log file. |
| EventID | A numeric value that uniquely identifies the log entry. It is analogous to the EventID in the Windows Event Log. |
| EventTypeName | A display name of the EventType value. Refer to System.Diagnostics.TraceEventType Enum document for details about this value. |
| EventType | A numeric value that is the Enum value of the event type. Refer to System.Diagnostics.TraceEventType Enum document for details about this value. |
| TimeStamp | The date and time the entry was created. Converted to local time (the time in the log file is recorded as UTC). |
| Source | The name of the component that generated the log entry |
| ProcessName | The name of the application that produced the log entry. |
| Computer | The name of the computer on which the application was running that produced the log entry. |
| Message | The custom message data for the log entry. |
