First published on TECHNET on Jul 18, 2010
You may encounter tapes in DPM libraries that are written with an unsupported block size and first need to be erased because DPM cannot evaluate such tapes and therefore will not do anything to it. The ZIP file that can be
contains a script, script user guide and two utilities to accomplish this on a DPM server that controls a library. The utilities actually are testing tools that provide the necessary functions to control changers and tape drives. The script automates the various steps and simplifies the syntax for erasing tapes.
Usage: DPMeraseTape.Ps1 <slot number> <unique part of library friendly name>
The script will load media from <slot number> into an empty tape-drive, erase the tape and move media back into the slot again. Further details are described in the user guide. Link:
The script can also be seen as a sample of automation with utilities designed for interactive use that maintain their own command shell. In this case “Mytape.exe” but the Windows “Diskshadow” utility would be another good sample. Typically series of meta-commands in a particular order make-up a task that is very hard to implement yourself. Although these utilities can take an input file with commands it provides no step by step interaction and conditional control. This script demonstrates how to run such a utility as separate process, send commands and process resulting output as asynchronous events.