Start-VBRScanBackup
Short Description
Starts a scan of backups with antivirus or YARA scan.
Product Edition: Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Start-VBRScanBackup -Object <VBRBackupObject[]> [-RestorePoint <VBRRestorePoint>] -ScanMode <VBRRestorePointScanMode> [-EnableAntivirusScan] [-EnableYARAScan] [-YARARule <String>] [-FromPointInTime <DateTime>] [-ToPointInTime <DateTime>] [-EnableEntireImageScan] [-RunAsync] [<CommonParameters>] |
Detailed Description
This cmdlet starts a scan of backups with antivirus or YARA scan. You can scan the following types of backups:
- Backups of VMware vSphere virtual machines created by Veeam Backup & Replication.
- Backups of Microsoft Hyper-V virtual machines created by Veeam Backup & Replication.
- Backups created by backup copy jobs.
- Backups of Nutanix AHV virtual machines created by Veeam Backup for Nutanix AHV.
- Backups of RHV VMs created by Veeam Backup for RHV.
- Backups of Windows machines created by Veeam Agent for Microsoft Windows.
- Backup of VMware Cloud Director VMs.
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
EnableAntivirusScan |
Enables secure restore. If you provide this parameter, Veeam Backup & Replication will trigger the antivirus software to scan selected VMs before the restore.
Default: |
|
False |
Named |
False |
|
EnableEntireImageScan |
Defines that the cmdlet will scan all restore points in backup even after it finds the first affected restore point.
Default: |
|
False |
Named |
False |
|
EnableYARAScan |
Defines that Veeam Backup & Replication will scan VMs with the specified YARA rule. If you do not provide this parameter, Veeam Backup & Replication will not scan VMs with the YARA rule.
Use the
Default: |
|
False |
Named |
False |
|
FromPointInTime |
Specifies the date and time. The cmdlet will scan backups that were created starting from this date and time.
Accepts the |
|
False |
Named |
False |
|
Object |
Specifies an array of backups that you want to scan.
Accepts the |
True |
Named |
False |
|
|
RestorePoint |
Specifies a restore point that you want to scan.
Accepts the |
|
False |
Named |
False |
|
RunAsync |
Defines that the command returns immediately without waiting for the task to complete. |
|
False |
Named |
False |
|
ScanMode |
Specifies one of the following scan modes:
|
|
True |
Named |
False |
|
ToPointInTime |
Specifies the date and time. The cmdlet will scan backups that were created by this date and time.
Accepts the |
|
False |
Named |
False |
|
YARARule |
Specifies the YARA rule. Veeam Backup & Replication will scan VMs with this rule.
Veeam Backup & Replication searches for YARA rules in the
To use a YARA rule, you must specify its name and extension. Veeam Backup & Replication accepts only |
|
False |
Named |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
Examples
Scanning Backups with YARA Scan
This example shows how scan backups with YARA scan.
|
$yararule = Get-VBRYARARule $backup = Get-VBRBackup $vmbackup = Get-VBRBackupObject -Backup $backup[0] Start-VBRScanBackup -Object $vmbackup[0] -ScanMode FirstInInterval -EnableYARAScan -YARARule $yararule[0] |
Perform the following steps:
- Run the
Get-VBRYARARuleReturns YARA rules. cmdlet. Save the result to the$yararulevariable. - Run the
Get-VBRBackupReturns backups. cmdlet. Save the result to the$backupvariable. - Run the
Get-VBRBackupObjectReturns backups or replicas of machines. cmdlet. Set the$backup[0]variable as theBackupparameter value. Save the result to the$vmbackupvariable.The
Get-VBRBackupObjectcmdlet will return an array of VM backups. Mind the ordinal number of the necessary VM backup (in our example, it is the first VM backup in the array). - Run the
Start-VBRScanBackupcmdlet. Specify the following settings:- Set the
$vmbackup[0]variable as theObjectparameter value. - Set the
FirstInIntervaloption for theScanModeparameter. - Provide the
EnableYARAScanparameter. - Set the
$yararule[0]variable as theYARARuleparameter value.
- Set the
Related Commands
Get-VBRYARARuleReturns YARA rules.Get-VBRBackupReturns backups.Get-VBRBackupObjectReturns backups or replicas of machines.