none
Fast Inventory using powershell RRS feed

  • Question

  • I Have followed this article for using dpm 2010 fast inventory using powershell however it seems to fail and I have no idea why.... seems straight forward to me.

    Anyone got ideas?

    $DPMLib=Get-DPMLibrary -DPMServerName "SERVER" Start-DPMLibraryInventory -DPMLibrary $DPMLib -FastInventory

    This is the error that is returned.....

    Get-DPMLibrary : A positional parameter cannot be found that accepts argument 'Start-DPMLibraryInventory'.
    At line:1 char:25
    + $DPMLib = Get-DPMLibrary <<<<  -DPMServerName "SERVER" Start-DPMLibraryInventory -DPMLibrary $DPMLib -FastInventory
        + CategoryInfo          : InvalidArgument: (:) [Get-DPMLibrary], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.GetLibrary

    The Tape library has a weird name as it has spaces and '( )' in the name. GetDPMLibrary returned this:

    Library: Hewlett Packard 1x8 G2 autoloader  (x64 based)

    Any assistance would be greatly appreciated!

    Thanks!


    Thursday, May 9, 2013 11:08 PM

All replies

  • Hi,

    Save the following into notepad and save as inventory.ps1, then run inventory.ps1

    $DPMLib=Get-DPMLibrary -DPMServerName "SERVER"
    Start-DPMLibraryInventory -DPMLibrary $DPMLib -FastInventory


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.


    Thursday, May 9, 2013 11:47 PM
    Moderator
  • I think its getting somewhere but it still errors out with the following...

    Start-DPMLibraryInventory : Cannot convert 'System.Object[]' to the type 'Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.LibraryManagement.Library' required by parameter 'DPMLibrary'. Specified method is not supported.
    At C:\Scripts\Inventory.ps1:2 char:38
    + Start-DPMLibraryInventory -DPMLibrary <<<<  $DPMLib -FastInventory
        + CategoryInfo          : InvalidArgument: (:) [Start-DPMLibraryInventory], ParameterBindingException
        + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.StartInventory

    Thanks for your help Mike!

    Friday, May 10, 2013 3:09 AM
  • Hi,

    Most likely multiple libraries are being returned so you will need to supply an index number to tell DPM which library to operate on. 

    Given the following commands and output, I'm selecting the last library returned [8] which is a zero based index into the output.

    PS C:\Program Files\Microsoft DPM\DPM\bin> $DPMLib=Get-DPMLibrary -DPMServerName dpm1

    PS C:\Program Files\Microsoft DPM\DPM\bin> $DPMLib

    Name                                 DriveCount               SlotCount     NumberOfIEPortSlots ProtectionGroups
    ----                                 ----------               ---------     ------------------- ----------------
    Library: Firestreame...                       5                     200                       0
    Stand-alone Drive: I...                       1                       0                       0
    Stand-alone Drive: I...                       1                       0                       0
    Stand-alone Drive: I...                       1                       0                       0
    Stand-alone Drive: I...                       1                       0                       0
    Stand-alone Drive: I...                       1                       0                       0
    Stand-alone Drive: I...                       1                       0                       0
    Stand-alone Drive: I...                       1                       0                       0
    Library: Sun/Storage...                      10                      50                       0 DPM2012-DB; Client

    PS C:\Program Files\Microsoft DPM\DPM\bin>Start-DPMLibraryInventory -DPMLibrary $DPMLib[8] -FastInventory


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, May 10, 2013 2:56 PM
    Moderator