--- title: "Set-VBRMalwareDetectionObjectAsClean" description: "This cmdlet sets the clean status for machines and hosts that were detected by malware. You can also mark restore points associated with these machines and hosts as clean." canonical: "https://helpcenter.veeam.com/docs/vbr/powershell/set-vbrmalwaredetectionobjectasclean.html" breadcrumb: "Veeam PowerShell Reference > Veeam PowerShell Reference > Managing Security Settings > Malware Detection > Set-VBRMalwareDetectionObjectAsClean" dateModified: "2026-08-19" --- # Set-VBRMalwareDetectionObjectAsClean ## Short Description Sets the clean status for machines and hosts detected by malware. **Product Edition**: Standard, Enterprise, Enterprise Plus, Veeam Universal License ## Syntax ``` Set-VBRMalwareDetectionObjectAsClean [-Object] [-Reason ] [-MarkAllRestorePoints] [-ExcludeObjectFromDetection] [] ``` ## Detailed Description This cmdlet sets the clean status for machines and hosts that were detected by malware. You can also mark restore points associated with these machines and hosts as clean. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

ExcludeObjectFromDetection

Defines that the cmdlet will add hosts and machines marked as clean to malware exclusions to prevent them from future rescans.

Default: False.

SwitchParameter

False

Named

False

MarkAllRestorePoints

Defines that the cmdlet will mark restore points that contain backups of machines as clean.

Default: False.

SwitchParameter

False

Named

False

Object

Specifies an array of IDs of hosts and machines that were detected by malware. The cmdlet will mark them as clean.

Accepts the VBRMalwareDetectionObject[] object. To create this object, run the Get-VBRMalwareDetectionObject cmdlet.

VBRMalwareDetectionObject[]

True

0

True (ByPropertyName, ByValue)

Reason

Specifies a reason for future reference.

String

False

Named

False

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see [ Microsoft Docs](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7). ## Output Object [`VBRMalwareDetectionObject`](vbrmalwaredetectionobject.md) ## Examples ::: example ### Settings Clean State for Machines and Restore Points This cmdlet sets the clean status for the `f2957c9c-2201-4473-9247-0590de4cc412` and `935d3e38-d444-4ef4-abae-d43f2f8b4ba1` machines and restore points associated with backups of these machines. ``` $machine = Get-VBRMalwareDetectionObject -ObjectId "f2957c9c-2201-4473-9247-0590de4cc412", "935d3e38-d444-4ef4-abae-d43f2f8b4ba1" Set-VBRMalwareDetectionObjectAsClean -Object $machine -ExcludeObjectFromDetection -MarkAllRestorePoints ``` Perform the following steps: 1. Run the [`Get-VBRMalwareDetectionObject`](get-vbrmalwaredetectionobject.md) cmdlet. Specify the `ObjectId` parameter value. Save the result to the `$machine` variable. 2. Run the `Set-VBRMalwareDetectionObjectAsClean` cmdlet. Set the `$machine` variable as the `Object` parameter value. Provide the `ExcludeObjectFromDetection` and the `MarkAllRestorePoints` parameters. ::: ## Related Commands [`Get-VBRMalwareDetectionObject`](get-vbrmalwaredetectionobject.md)