Export-VBRLogs
Short Description
Collects system logs for export.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
This cmdlet provides 4 parameter sets.
- For collecting logs for hosts:
Export-VBRLogs -Server <CHost[]> -FolderPath <string> [-Compress] [-From <datetime>] [-To <datetime>] [-Wait] [<CommonParameters>] |
- For collecting logs for jobs:
Export-VBRLogs -Job <IJob[]> -FolderPath <string> [-Compress] [-From <datetime>] [-To <datetime>] [-Wait] [<CommonParameters>] |
- For collecting logs for virtual infrastructure components (VMs, datastores):
Export-VBRLogs -Entity <IVmItem[]> -FolderPath <string> [-Compress] [-From <datetime>] [-To <datetime>] [-Wait] [<CommonParameters>] |
- For collecting logs for backups:
Export-VBRLogs -Backup <CBackup[]> -FolderPath <string> [-Compress] [-From <datetime>] [-To <datetime>] [-Wait] [<CommonParameters>] |
Detailed Description
This cmdlet collects system logs. The log files are written to the folder you specify in this cmdlet.
You can use this cmdlet to collect logs you can send to the Veeam support.
You can get logs for all kind of virtual host, any jobs including SureBackup jobs, all entities including datastores, clusters, replicas, etc., or any backup. Use an appropriate parameter set for each case.
Parameters
Parameter | Description | Required | Position | Accept | Accept |
---|---|---|---|---|---|
Server | Specifies the array of servers. The cmdlet will collect logs from these servers. Note that selected servers must be running and reachable over the network. | True | Named | True (ByValue, | False |
Job | Specifies the array of jobs. The cmdlet will collect logs of these jobs. Accepts all kind of jobs. | True | Named | True (ByValue, | False |
Entity | Specifies the array of VMs. The cmdlet will collect logs of these VMs. | True | Named | True (ByValue, | False |
Backup | Specifies the array of backups. The cmdlet will collect logs of these backups. | True | Named | True (ByValue, | False |
FolderPath | Specifies the destination folder. The cmdlet will export logs to this folder. | True | Named | False | False |
Compress | Indicates that the log files will be archived. | False | Named | False | False |
From | Specifies the start date to collect the logs for export. Enter the date in format set in your workstation Date and Time settings. | False | Named | False | False |
To | Specifies the end date to collect the logs for export. Enter the date in format set in your workstation Date and Time settings. | False | Named | False | False |
Wait | Indicates that the command waits for the process to complete before accepting more input. | False | Named | False | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Example 1
This command starts collecting log files from the server represented by the $server variable. The destination path is C:\Logs. The period for collecting data is February, 21, 2021 - March, 25, 2021. The data compression is enabled. Run Get-VBRServer to get the source server.
$fromdate = Get-Date -Year 2021 -Month 2 -Day 21 -Hour 0 -Minute 0 -Second 0 $todate = Get-Date -Year 2021 -Month 3 -Day 25 -Hour 0 -Minute 0 -Second Export-VBRLogs -Server $server -FolderPath "C:\Logs" -Compress -From $fromdate -To $todate |
Example 2
This command starts collecting log files for the SureBackup job named "DC SureJob". The job is obtained with Get-VSBJob and piped down. The destination path is C:\Logs\SureBackup Logs. The period for collecting data is not set to collect all the data for the job. The data compression is enabled.
Example 3
This command starts collecting log files for the VM named "DC" for March, 2021. The VM is obtained with Find-VBRViEntity and piped down. The destination path is C:\Logs. The data compression is enabled.
$fromdate = Get-Date -Year 2021 -Month 3 -Day 21 -Hour 0 -Minute 0 -Second 0 $todate = Get-Date -Year 2021 -Month 5 -Day 25 -Hour 0 -Minute 0 -Second Find-VBRViEntity -Name "DC" | Export-VBRLogs -FolderPath "C:\Logs" -Compress -From $fromdate -To $todate |
Related Commands