none
"CLI Script: Force mark tape as free" / command "get-tape" does not work RRS feed

  • Question

  • Hello there,

    we are using DPM 2010 RTM EVAL (German) with the recommended Firestreamer as virtual tape library for 8 protectiongroups. The retention for the tape-backups is set to one week (more less is not possible), so we need to erase the tapes / mark them as free when using the external hard disks next time.

    So we tried to use the script from http://blogs.technet.com/b/dpm/archive/2007/09/04/cli-script-force-mark-tape-as-free.aspx , but it dows not work. We started to check the commands and figured out, that the "get-tape -dpmlibrary <libraryname>" gives an error.

    Here is what we get with get-tapelibrary :

    Name                                                     Drives                           Slots                       I/E ports Protection groups
    ----                                                     ------                           -----                       --------- -----------------
    Bibliothek: Firestreamer Med...                               5                             200                               0
    Bibliothek: Firestreamer                                      5                              50                               0 xxxxxxx
    Bibliothek: Firestreamer Med...                               5                             200                               0

    The first and third are from previous tries, the second is now active and working good

    If we use the command   get-tape -dpmlibrary Firestreamer    the shell returns the following error:

    Get-Tape : Der Parameter "DPMLibrary" kann nicht gebunden werden. Der Wert "Firestreamer" vom Typ "System.String" kann nicht in den Typ "Microsoft.Internal.Ent
    erpriseStorage.Dls.UI.ObjectModel.LibraryManagement.Library" konvertiert werden.
    Bei Zeile:1 Zeichen:21
    + get-tape -dpmlibrary <<<<  Firestreamer
        + CategoryInfo          : InvalidArgument: (:) [Get-Tape], ParameterBindingException
        + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.GetMedia

    Using " or ' with the library name also gioves the same error.

    Additional question: Does DPM take the free tapes in ascending order of the library slots?

    Best regards

     

    Tuesday, July 6, 2010 8:13 AM

Answers

  • Oeps,

    My bad, made a few errors here... Sorry

    $librarylist = Get-DPMlibrary DPMServername

    get-tape -dpmlibrary $librarylist

    Again, my apologies


    Visit System Center User Group Belgium @ http://scug.be and http://scug.be/blogs/scdpm
    • Marked as answer by trcc Wednesday, July 7, 2010 5:31 AM
    Tuesday, July 6, 2010 9:28 AM
    Moderator

All replies

  • Could you try it like this:

    $librarylist = Get-DPMlibrary -DPMLibrary DPMServername

    get-tape -dpmlibrary $library

    Just my 2 cents

    Cheers,

    Mike


    Visit System Center User Group Belgium @ http://scug.be and http://scug.be/blogs/scdpm
    Tuesday, July 6, 2010 8:50 AM
    Moderator
  • I can't get through the first step...

    Get-DPMLibrary : Es wurde kein Parameter gefunden, der dem Parameternamen "DPMLibrary" entspricht.
    Bei Zeile:1 Zeichen:42
    + $librarylist = Get-DPMlibrary -DPMLibrary <<<<  xxx.yyy.zzzz.de
        + CategoryInfo          : InvalidArgument: (:) [Get-DPMLibrary], ParameterBindingException
        + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.GetLibrary

     

    If I use $librarylist = Get-DPMlibrary DPMServername  (without -DPMLibrary) I can go on, but then I am stopped by

     

    Get-Tape : Das Argument für den Parameter "DPMLibrary" kann nicht überprüft werden. Das Argument ist NULL. Geben Sie ein Argument an, das nicht NULL ist, und führen Sie dann den Befehl erneut aus.
    Bei Zeile:1 Zeichen:21
    + get-tape -dpmlibrary <<<<  $library
        + CategoryInfo          : InvalidData: (:) [Get-Tape], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.GetMedia

    Tuesday, July 6, 2010 9:12 AM
  • Oeps,

    My bad, made a few errors here... Sorry

    $librarylist = Get-DPMlibrary DPMServername

    get-tape -dpmlibrary $librarylist

    Again, my apologies


    Visit System Center User Group Belgium @ http://scug.be and http://scug.be/blogs/scdpm
    • Marked as answer by trcc Wednesday, July 7, 2010 5:31 AM
    Tuesday, July 6, 2010 9:28 AM
    Moderator
  • Now it is working, thank you!

    It seems to be a difference in typing the library-name or copy&paste / getting in from a variable.

    Wednesday, July 7, 2010 5:31 AM