none
Automating the DPM mailbox restore with Powershell

    Question

    1. System Center 2016 - Using DPM PowerShell to automate the procedure to allow Users to  perform their own mailbox restore.    
    2. Can this procedure be performed using only PS commands?
    3. Has this been done before and do you see any problems doing this automation?
    Friday, May 18, 2018 8:15 AM

Answers

  • It depends on your company’s policies I guess, granting a normal user access gives him permission to both backup and recover. Backing up itself should be quite safe but when recovering there is possible for high risks. Do note that they can recover all data that is backed up in DPM, it may or may not be sensitive data, Kind regards, Leon

    Blog: https://thesystemcenterblog.com  LinkedIn:   

    • Marked as answer by PeterCCS Monday, May 21, 2018 3:50 AM
    Monday, May 21, 2018 3:45 AM

All replies

  • Hi!

    You can restore a Exchange mailbox with the DPM PowerShell by making use of the commands below:

    Get-DPMRecoverableItem

    The Get-DPMRecoverableItem cmdlet gets a list of recoverable items in a recovery point for System Center 2016 - Data Protection Manager (DPM). The recoverable items based on source are as follows:

    File system: Files and folders
    Microsoft Exchange Server: Storage groups, databases, and mailboxes
    Microsoft SQL Server: Databases
    Microsoft SharePoint: Sites, databases, and documents
    Virtual Machines
    A DPM server
    System state of a protected computer

    Restore-DPMRecoverableItem

    The Restore-DPMRecoverableItem cmdlet recovers a point in time version of a recoverable item to the target location. A recoverable item is a data source or a child recoverable item in a data source.


    I have not done anything like this myself, but since this is PowerShell it should be possible to automate this.

    If you want to give users this permission, they will need to have permission to the DPM.

    Kind regards,
    Leon


    Blog: https://thesystemcenterblog.com  LinkedIn:   

    Friday, May 18, 2018 9:39 AM
  • Thanks Leon,

    Do you see any risk in giving users DPM permission?

    Cheers,

    Peter.

    Monday, May 21, 2018 2:59 AM
  • It depends on your company’s policies I guess, granting a normal user access gives him permission to both backup and recover. Backing up itself should be quite safe but when recovering there is possible for high risks. Do note that they can recover all data that is backed up in DPM, it may or may not be sensitive data, Kind regards, Leon

    Blog: https://thesystemcenterblog.com  LinkedIn:   

    • Marked as answer by PeterCCS Monday, May 21, 2018 3:50 AM
    Monday, May 21, 2018 3:45 AM
  • When the run PS commands for retrieving the Restore Points, how would this be displayed to the user?

    Note that he user will be accessing this via a Web Portal so the displayed info should be not too complicated so the user can select and follow procedure to perform the restore mailbox.

    Thanks.

    Peter

    Monday, May 21, 2018 8:29 AM
  • Have you know of examples where DPM mailbox restore is automated by PS scripts to allow the users to perform their own restore mailbox and Admin just needs to approve the request by granting rights?

    Thanks,

    Pete


    Regards Peter

    Thursday, May 31, 2018 3:45 AM
  • Hi Leon,

    To perform the full DPM Mailbox Restore, does it require local or Domain Admin rights?

    Thanks.


    Regards Peter

    Wednesday, June 13, 2018 6:58 AM
  • I'm afraid I don't know of any automated processes like this.

    If a user want's to be able to restore his mailbox he will need permissions to the DPM.

    - If the DPM server has its SQL database locally, local administrators on the DPM servers can perform DPM mailbox restore (only if the local administrators have access to the DPM SQL database)

    - If the DPM server has its SQL database remotely, domain users that have been assigned in the DPM SQL database will have access to perform a mailbox restore.

    You can install the DPM management shell on remote computers, see more here.


    Blog: https://thesystemcenterblog.com  LinkedIn:   

    Wednesday, June 13, 2018 7:09 AM
  • Hello I am trying to recovery data to a location using DPM powershell cmdlets but and getting an error on the final command to restore.

    DPM Server:DPM Server02

    Data Source: HVDCenter02

    Recovery Location: C:\VMRecovery

    PS C:\>$PGroup = Get-DPMProtectionGroup -DPMServerName "DPMServer02"
    PS C:\> $PObjects = Get-DPMDatasource -ProtectionGroup $PGroup[0]
    PS C:\> $RPoint = Get-DPMRecoveryPoint -Datasource $PObjects[0] | Sort -Property RepresentedPointInTime -Descending | Select-Object -First 1
    PS C:\> $ROption = New-DPMRecoveryOption -HyperVDatasource -TargetServer "HVDCenter02" -RecoveryLocation AlternateHyperVServer -RecoveryType Recover -TargetLocation "C:\VMRecovery"
    PS C:\> Restore-DPMRecoverableItem -RecoverableItem $RPoint -RecoveryOption $ROption

    On the final command i get an error:

    Restore-DPMRecoverableItem : The specified recovery options are not valid.(ID:31095)

    Check the parameters that you are passing to the cmdlet and ensure that these p
    arameters correspond to the data source type that you are attempting to recover.

    At Line:1 char:1

    Can anyone advise where is it going wrong?

    Im using DPM 2016 and just trying to recovery a data to a separate location.

    Thanks,

    • Edited by PeterCCS Thursday, June 28, 2018 8:12 AM
    Thursday, June 28, 2018 6:26 AM