This is an archive version of the document. To get the most up-to-date information, see the current version.

Export-VBOLog

In this article

    Short Description

    Exports log data.

    Syntax

    This cmdlet provides the following parameter sets.

    • Export all collected logs

    Export-VBOLog -ServerComponent <VBOServerComponent[]> -All  -TargetPath <String>  [<CommonParameters>]

    • Export logs for a specified time period

    Export-VBOLog -ServerComponent <VBOServerComponent[]> -TargetPath <String> [-From <DateTime>] [-To <DateTime>]  [<CommonParameters>]

    • Export logs collected for a specified amount of days

    Export-VBOLog -ServerComponent <VBOServerComponent[]> -TargetPath <String> [-DayPeriod]  [<CommonParameters>]

    Detailed Description

    This cmdlet exports logs of a specified server component.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    ServerComponent

    Specifies an array of server components. This cmdlet will export logs of the specified server component.

    False

    Named

    false

    False

    All

    Indicates that this cmdlet will export logs for all time. You cannot use From, To and DayPeriod parameters if this parameter is used.

    True

    Named

    False

    False

    TargetPath

    Specifies a target path for the log export. This cmdlet will export logs to this destination.

    True

    Named

    False

    False

    From

    Specifies date and time, starting from which this cmdlet will export the logs. If this parameter is used, you must use To parameter and you cannot use All and DayPeriod parameters. You must enter date and time in a DateTime format.

    False

    Named

    False

    False

    To

    Specifies the date and time, until which this cmdlet will export the logs. If this parameter is used, you must use To parameter and you cannot use All and DayPeriod parameters. You must enter date and time in a DateTime format.

    False

    Named

    False

    False

    DayPeriod

    Specifies the number of last N days. The cmdlet will export logs for these days.

    NOTE: You cannot use the All parameter if this parameter is used.

    False

    Named

    False

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

    Example 1

    This example shows how to export all logs collected for a backup proxy. The cmdlet will restore logs with the following settings:

    • Logs will be restored for a backup proxy with the 06b7354e-518f-4a10-b4c1-98f49d743012 ID
    • The cmdlet will restore logs to the C:\Veeam\Office365\Logs folder.

    You must perform the following steps:

    1. Run the Get-VBOServerComponents cmdlet. Set proxy as the Name parameter value. Set 06b7354e-518f-4a10-b4c1-98f49d743012 as the ID parameter value. Save the result to the $proxy variable.
    2. Run the Export-VBOLog cmdlet. Set the $proxy variable as the ServerComponent parameter value. Set C:\Veeam\Office365\Logs as the TargetPath parameter value. Provide the All parameter.

    $proxy = Get-VBOServerComponents -Name proxy -ID 06b7354e-518f-4a10-b4c1-98f49d743012

    Export-VBOLog -ServerComponent $proxy -All -TargetPath "C:\Veeam\Office365\Logs"

    Example 2

    This example shows how to export logs for a backup proxy for a specific period. The cmdlet will restore logs with the following settings:

    • Logs will be restored for a backup proxy with the 06b7354e-518f-4a10-b4c1-98f49d743012 ID
    • The restore period of logs is set from 08/29/2017 10:00 AM to 11/15/2017 10:AM
    • The cmdlet will restore logs to the C:\Veeam\Office365\Logs folder.

    You must perform the following steps:

    1. Run the Get-VBOServerComponents cmdlet. Set proxy as the Name parameter value. Set 06b7354e-518f-4a10-b4c1-98f49d743012 as the ID parameter value. Save the result to the $proxy variable.
    2. Set the start date of the restore period in the $datefrom variable and cast the date string to the datetime type.
    3. Set the end date of the restore period in the $dateto variable and cast the date string to the datetime type.
    4. Run the Export-VBOLog cmdlet. Set the $proxy variable as the ServerComponent parameter value. with the $proxy variable and From and To parameters to export the logs of this proxy to the specified path. Use TargetPath parameter to specify the export destination.

    $proxy = Get-VBOServerComponents -Name proxy -ID 06b7354e-518f-4a10-b4c1-98f49d743012

    $datefrom = [datetime]"08/29/2017 10:00 AM"

    $dateto = [datetime]"11/15/2017 10:00 AM"

    Export-VBOLog -ServerComponent $proxy -From $datefrom -To $dateto -TargetPath "C:\Veeam\Office365\Logs"

    Example 3

    This example shows how to export logs of the proxy Veeam Backup for Microsoft Office 365 server component with an ID 06b7354e-518f-4a10-b4c1-98f49d743012 that will be gathered for 10 consequently recent days.

    1. Run Get-VBOServerComponents with the Name and an ID parameters to get the proxy. Save the result to the $proxy variable.
    2. Run Export-VBOLog with the $proxy variable and the DayPeriod parameter to export the logs of this proxy to the specified path. Use TargetPath parameter to specify the export destination.

    $proxy = Get-VBOServerComponents -Name proxy -ID 06b7354e-518f-4a10-b4c1-98f49d743012

    Export-VBOLog -ServerComponent $proxy -DayPeriod 10 -TargetPath "C:\Veeam\Office365\Logs"

    Related Commands

    Get-VBOServerComponents

    I want to report a typo

    There is a misspelling right here:

     

    I want to let the Veeam Documentation Team know about that.