none
Remove Protection Group DPM 2010

    Frage

  • $pg = Get-ProtectionGroup -DPMServerName LABDPM02
    $mpg=Get-ModifiableProtectionGroup $pg[0]
    $po = Get-Datasource -ProtectionGroup $pg
    Remove-ChildDatasource -ProtectionGroup $mpg -ChildDatasource $po[0]
    ---------------------------------------------
    ----------------------------------------------
    Error 
    Remove-ChildDatasource : The item D:\ cannot be excluded because it is a data source. (ID: 31020)
    At line:1 char:23
    + Remove-ChildDatasource <<<<  -ProtectionGroup $mpg -ChildDatasource $po[0]
        + CategoryInfo          : NotSpecified: (:) [Remove-ChildDatasource], DlsException
        + FullyQualifiedErrorId : 31020,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.RemoveProtectableObject

    Please help me to resolve this problem.

    Regards

    Abul Hasnat

    Mittwoch, 20. Juni 2012 22:48

Antworten

  • Hi Abul,

    To remove File datasources, you need to use Get-ChildDatasource Cmdlet:

    $pg = Get-ProtectionGroup -DPMServerName LABDPM02
    $mpg=Get-ModifiableProtectionGroup $pg[0]
    $po = Get-Datasource -ProtectionGroup $pg ## Retrieve Volume datasource like c:\, D:\...
    $Cd = Get-ChildDatasource -ChildDatasource $po ## retrieve Child datasouce like folder...
    Remove-ChildDatasource -ProtectionGroup $mpg -ChildDatasource $Cd[x]
    Set-ProtectionGroup $mpg

    Stephane


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Donnerstag, 21. Juni 2012 08:40
  • 
    Hello Stephane,
    Thank you very much for this valuable solutions. I am not that expert on DPM 2010 specifically Cmdlet. My intention is to cancel or stop PG for a stuck job which is running for 300 hrs.  Please help to cancel this job.
    To make it work, I had to modify and run the script as:
    $pg = Get-ProtectionGroup -DPMServerName AALABSDPMV02
    $mpg=Get-ModifiableProtectionGroup $pg
    ## Retrieve Volume datasource like c:\, D:\...
    $po = Get-Datasource -ProtectionGroup $pg 
    ## retrieve Child datasouce like folder...
    $Cd = Get-ChildDatasource -ChildDatasource $po[1]
    Remove-ChildDatasource -ProtectionGroup $mpg -ChildDatasource $Cd
    Set-ProtectionGroup $mpg
    The script:
    At $mpg=Get-ModifiableProtectionGroup $pg[0] not working. Without [0] it is working ok but after complete it is running inconsistency check “Replica inconsistent” 
     
    Regards
    Abul Hasnat
    The original script:
    $pg = Get-ProtectionGroup -DPMServerName LABDPM02
    $mpg=Get-ModifiableProtectionGroup $pg[0]
    ## Retrieve Volume datasource like c:\, D:\...
    $po = Get-Datasource -ProtectionGroup $pg 
    ## retrieve Child datasouce like folder...
    $Cd = Get-ChildDatasource -ChildDatasource $po 
    Remove-ChildDatasource -ProtectionGroup $mpg -ChildDatasource $Cd[0]
    Set-ProtectionGroup $mpg
    The error message:
    PS D:\Program Files\Microsoft DPM\DPM\bin> testor
    Unable to index into an object of type Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup.
    At D:\Program Files\Microsoft DPM\DPM\bin\Testor.ps1:3 char:40
    + $mpg=Get-ModifiableProtectionGroup $pg[ <<<< 0]
        + CategoryInfo          : InvalidOperation: (0:Int32) [], RuntimeException
        + FullyQualifiedErrorId : CannotIndex
    Get-ChildDatasource : Cannot convert 'System.Object[]' to the type 'Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectableObject' required by parameter 'Chil
    dDatasource'. Specified method is not supported.
    At D:\Program Files\Microsoft DPM\DPM\bin\Testor.ps1:9 char:43
    + $Cd = Get-ChildDatasource -ChildDatasource <<<<  $po
        + CategoryInfo          : InvalidArgument: (:) [Get-ChildDatasource], ParameterBindingException
        + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.GetProtectableObject
    Unable to index into an object of type Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.FileSystem.FsProtectableObject.
    At D:\Program Files\Microsoft DPM\DPM\bin\Testor.ps1:11 char:67
    + Remove-ChildDatasource -ProtectionGroup $mpg -ChildDatasource $Cd[ <<<< 0]
        + CategoryInfo          : InvalidOperation: (0:Int32) [], RuntimeException
        + FullyQualifiedErrorId : CannotIndex
    Set-ProtectionGroup : This step cannot be performed because some of the prerequisite steps have not run. Please ensure that the appropriate steps among New-ProtectionGroup, Get-Mo
    difiableProtectionGroup have run successfully and then retry this step. For more details, see DPM Help. (ID: 31052)
    At D:\Program Files\Microsoft DPM\DPM\bin\Testor.ps1:13 char:20
    + Set-ProtectionGroup <<<<  $mpg
        + CategoryInfo          : NotSpecified: (:) [Set-ProtectionGroup], DlsException
        + FullyQualifiedErrorId : 31052,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.CommitProtectionGroup
    PS D:\Program Files\Microsoft DPM\DPM\bin>


    AbulHasnat

    Donnerstag, 21. Juni 2012 15:13

Alle Antworten

  • Hi Abul,

    To remove File datasources, you need to use Get-ChildDatasource Cmdlet:

    $pg = Get-ProtectionGroup -DPMServerName LABDPM02
    $mpg=Get-ModifiableProtectionGroup $pg[0]
    $po = Get-Datasource -ProtectionGroup $pg ## Retrieve Volume datasource like c:\, D:\...
    $Cd = Get-ChildDatasource -ChildDatasource $po ## retrieve Child datasouce like folder...
    Remove-ChildDatasource -ProtectionGroup $mpg -ChildDatasource $Cd[x]
    Set-ProtectionGroup $mpg

    Stephane


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Donnerstag, 21. Juni 2012 08:40
  • 
    Hello Stephane,
    Thank you very much for this valuable solutions. I am not that expert on DPM 2010 specifically Cmdlet. My intention is to cancel or stop PG for a stuck job which is running for 300 hrs.  Please help to cancel this job.
    To make it work, I had to modify and run the script as:
    $pg = Get-ProtectionGroup -DPMServerName AALABSDPMV02
    $mpg=Get-ModifiableProtectionGroup $pg
    ## Retrieve Volume datasource like c:\, D:\...
    $po = Get-Datasource -ProtectionGroup $pg 
    ## retrieve Child datasouce like folder...
    $Cd = Get-ChildDatasource -ChildDatasource $po[1]
    Remove-ChildDatasource -ProtectionGroup $mpg -ChildDatasource $Cd
    Set-ProtectionGroup $mpg
    The script:
    At $mpg=Get-ModifiableProtectionGroup $pg[0] not working. Without [0] it is working ok but after complete it is running inconsistency check “Replica inconsistent” 
     
    Regards
    Abul Hasnat
    The original script:
    $pg = Get-ProtectionGroup -DPMServerName LABDPM02
    $mpg=Get-ModifiableProtectionGroup $pg[0]
    ## Retrieve Volume datasource like c:\, D:\...
    $po = Get-Datasource -ProtectionGroup $pg 
    ## retrieve Child datasouce like folder...
    $Cd = Get-ChildDatasource -ChildDatasource $po 
    Remove-ChildDatasource -ProtectionGroup $mpg -ChildDatasource $Cd[0]
    Set-ProtectionGroup $mpg
    The error message:
    PS D:\Program Files\Microsoft DPM\DPM\bin> testor
    Unable to index into an object of type Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup.
    At D:\Program Files\Microsoft DPM\DPM\bin\Testor.ps1:3 char:40
    + $mpg=Get-ModifiableProtectionGroup $pg[ <<<< 0]
        + CategoryInfo          : InvalidOperation: (0:Int32) [], RuntimeException
        + FullyQualifiedErrorId : CannotIndex
    Get-ChildDatasource : Cannot convert 'System.Object[]' to the type 'Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectableObject' required by parameter 'Chil
    dDatasource'. Specified method is not supported.
    At D:\Program Files\Microsoft DPM\DPM\bin\Testor.ps1:9 char:43
    + $Cd = Get-ChildDatasource -ChildDatasource <<<<  $po
        + CategoryInfo          : InvalidArgument: (:) [Get-ChildDatasource], ParameterBindingException
        + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.GetProtectableObject
    Unable to index into an object of type Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.FileSystem.FsProtectableObject.
    At D:\Program Files\Microsoft DPM\DPM\bin\Testor.ps1:11 char:67
    + Remove-ChildDatasource -ProtectionGroup $mpg -ChildDatasource $Cd[ <<<< 0]
        + CategoryInfo          : InvalidOperation: (0:Int32) [], RuntimeException
        + FullyQualifiedErrorId : CannotIndex
    Set-ProtectionGroup : This step cannot be performed because some of the prerequisite steps have not run. Please ensure that the appropriate steps among New-ProtectionGroup, Get-Mo
    difiableProtectionGroup have run successfully and then retry this step. For more details, see DPM Help. (ID: 31052)
    At D:\Program Files\Microsoft DPM\DPM\bin\Testor.ps1:13 char:20
    + Set-ProtectionGroup <<<<  $mpg
        + CategoryInfo          : NotSpecified: (:) [Set-ProtectionGroup], DlsException
        + FullyQualifiedErrorId : 31052,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.CommitProtectionGroup
    PS D:\Program Files\Microsoft DPM\DPM\bin>


    AbulHasnat

    Donnerstag, 21. Juni 2012 15:13
  • Hello,

    I am trying to stop a Protection Group or cancel the job which is running for long time. The DPM 2010 Management Console can't sotp the PG. How can I Stop the PG or cancel the job through DPM Management Shell? Please help

    Regards

    Abul Hasnat


    AbulHasnat

    Freitag, 22. Juni 2012 14:10
  • Hi Stephen,

    Your Script is working perfectly and I appreciate your help. I want to delete/Stop a protection group. The protected server is not responding and the protection group cannot be delete through DPM 2010 management console. How can I delete protection group from Management Shell? Please help.

    Regards

    Abul Hasnat 


    AbulHasnat

    Mittwoch, 27. Juni 2012 22:36