Tuesday, 3 January 2017

Use powershell to delete multiple snapshots on a NetApp volume

The following command will delete all snapshots from all volumes of all vservers.

 get-ncsnapshot -volume * -vserver *  | remove-NcSnapshot -confirm 

The command can be modified to delete specific volume snapshot by specifying value of the volume

 get-ncsnapshot -volume <value> -vserver * | remove-NcSnapshot -confirm 

If the snapshot has a pattern (like snapshots created by CommVault backups) then the command can be modified something like this:

 get-ncsnapshot -volume <value> -vserver * |?{$_.name -like "SP_*"}| remove-NcSnapshot -confirm



No comments:

Post a Comment

Commvault : DR backup to cloud fails to run

 The Commvault DR backup to cloud (an option within Control Panel of Commvault console) was reporting failures.  The CVCloudService.log repo...