The Problem

Quite some time ago I wasn’t able to delete a device (storage target) named “internal RAID” in Backup Exec 15. The GUI came up with this error message:

“The device (or media server) cannot be deleted because existing jobs or selection lists remain.”

Going through all jobs in the GUI i could not find any with the storage as target of a backup job. Very strange …

The Google-Search

Firing up Google I found the technical article from Symantec Veritas TECH126877 suggesting to call the Symantec Support?!?!1

The solution

I could not believe this was the suggested way to remove a device from Backup Exec and by chance stumbled upon the “Backup Exec Management Command Line”-Tool.

Firing it up welcomes you with the basic commands. Typing “Get-BECommand” gives you an overview of all available BackupExec commands.

In this list I found the commands “Get-BEJob” and “Remove-BEJob”. So let’s check what we get if we run “Get-BEJob”.

Great, we get an object which we can filter by “Storage”. So let’s see what “Remove-BEJob” takes as an input.

I see, so I can pipe those objects from “Get-BEJob” to “Remove-BEJob”.

All it takes is to get all BackupExec jobs using “Get-BEJob”, filter those where the storage is “internal RAID” and pipe those objects to “Remove-BEJob”.

One can also add “-WhatIf” to see what it removes .. just to be sure ;)

Get-BEJob | where storage -eq "internal RAID" | Remove-BEJob

All it takes is a bit of PowerShell .. or one could of course call the Symantec/Veritas Support …