ONTAP Discussions

Enable anti-ransomware for multiple volumes

LimorK
856 Views

Ontap 12.1.

Is there a way (probably cli or powershell) to pipe all volumes with a status of dry-run and change them to enable?

2 REPLIES 2

Abeltran
694 Views

Hi Limork,

 

From cli you can execute the command to change from dry-run to enable.

 

First you need to get all the volumenes on dry-run:

 

security anti-ransomware volume show -state dry-run

 

And then enable them:

 

security anti-ransomware volume enable -vserver vserver_name -volume volume_name

 

Is recommened 30 days on dry-run of the volumes before enable them.

 

Kind regards,

 

Albert

LimorK
691 Views

Thanks Albert. What I had in mind was if I could do it in a single command. Something like
security anti-ransomware volume show -state dry-run | .... enable
I understand that I have to do it one by one.

Public