I think should work.
set media=
for /f "Tokens=*" %%a in ('rsm view /cg%TapeDriveGUID%
/TPhysical_media') do (if not "%%a"=="The command completed
successfully." set media=%%a)
if /i "%media%" EQU "Unable to open session with the RSM server." goto
checkmedia
if /i "%media%" EQU "PHYSICAL_MEDIA" goto notape
if not defined media goto notape
rsm.exe eject /pf"%media%" /astart
:notape
exit
You WILL have to replace %TapeDriveGUID% with your tape drive's actual
GUID number which can be seen by the command "rsm view /tlibrary
/guiddisplay"
You can also try my free NTBackupScript at
http://ntbackup.no-ip.com
which ejects the tapes, sends backup report logs and change tape
reminders via email.
-Good Luck!