Skip to main content
SnapCenter Software 5.0

Clean up the secondary backup count using PowerShell cmdlets

Contributors netapp-nsriram netapp-soumikd

You can use the Remove-SmBackup cmdlet to clean up the backup count for secondary backups that have no Snapshot. You might want to use this cmdlet when the total Snapshots displayed in the Manage Copies topology do not match the secondary storage Snapshot retention setting.

You must have prepared the PowerShell environment to execute the PowerShell cmdlets.

The information regarding the parameters that can be used with the cmdlet and their descriptions can be obtained by running Get-Help command_name. Alternatively, you can also refer to the SnapCenter Software Cmdlet Reference Guide.

  1. Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.

    Open-SmConnection  -SMSbaseurl  https:\\
  2. Clean up secondary backups count using the -CleanupSecondaryBackups parameter.

    This example cleans up the backup count for secondary backups with no Snapshots:

    Remove-SmBackup -CleanupSecondaryBackups
    Are you sure want to remove the backup(s).
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):