Command
Export-Report
Description
The command to export your Migration reports.
Note: You can only use PowerShell to run migration tasks with ShareGate; this command can only export Migration reports.
Examples
Export Copy Result with All Columns
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $result = Copy-List -All -SourceSite $srcSite -DestinationSite $dstSite Export-Report $result -Path "C:\MyReports\CopyContentReports.xlsx"
Export Copy Result with Default Columns
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $result = Copy-List -All -SourceSite $srcSite -DestinationSite $dstSite Export-Report $result -Path "C:\MyReports\CopyContentReports.xlsx" -DefaultColumns
Export Copy Result with session ID as file name
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite"
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite"
$srcList = Get-List -Name "mysrclist" -Site $srcSite
$dstList = Get-List -Name "mydstlist" -Site $dstSite
$result = Copy-Content -SourceList $srcList -DestinationList $dstList
Export-Report $result -Path "C:\MyReports\"
Note: By specifying a path with no file name, your report is exported as an Excel spreadsheet (or CSV with Copy-mailbox
) with the session ID as the file name. This is ideal when exporting migration reports in a foreach loop.
Export Copy Results as a CSV
Export-Report -SessionId 210131-1 -Path "C:\MyReports\CopyContentReports.csv"
Export Merged Copy Results Within a Time Range
$results = Find-CopySessions -From "2021/01/01" -To "2021/02/01"
Export-Report $results -Path "C:\MyReports\"
Export Multiple Sessions
Export-Report -SessionId 210101-1,210101-5,210201-1,210228-4 -Path "C:\MyReports\ExportReport.xlsx"
Tip: See Parameters below for more information on -SessionId.
Syntax
Export-Report -CopyResult <CopyResult> [-Path <String>] [-DefaultColumns <SwitchParameter>] [-NoItems <SwitchParameter>] [-NoItemVersions <SwitchParameter>] [-Overwrite <SwitchParameter>]
Export-Report -SessionId <String[]> [-Path <String>] [-DefaultColumns <SwitchParameter>] [-NoItems <SwitchParameter>] [-NoItemVersions <SwitchParameter>] [-Overwrite <SwitchParameter>]
Parameters
-CopyResult <CopyResult>
Specifies the copy result.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | Default |
Aliases | None |
-DefaultColumns <SwitchParameter>
Specifies that only default columns will be exported.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoItems <SwitchParameter>
Specifies that items will not be exported.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoItemVersions <SwitchParameter>
Specifies that item versions will not be exported.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Overwrite <SwitchParameter>
Specifies that file will be overwritten if already exist.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Path <String>
Specifies the path where you want to save the file. Supported formats are Excel and CSV.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |
-SessionId <String[]>
Specifies the session identifiers. The format of the session ID is yymmdd-# where yy represents the year, mm the month, dd the day, and # represents the session number for that migration, based on all sessions/tasks performed for the day. The # restarts at 1 each day. To combine multiple sessions in a single report, split multiple sessions with commas. For example, 211101-1,211101-12,211108-5.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | SessionId |
Aliases | None |