scripted recovery of Hyper-V VM Protection Group fails (DPM 2010)

Answered scripted recovery of Hyper-V VM Protection Group fails (DPM 2010)

  • Monday, April 11, 2011 12:30 PM
     
      Has Code

    I wrote a powershell script to recover VM (Hyper-V).

     

    Connect-DPMServer $DPMServer
    $pg = Get-ProtectionGroup -DPMServerName $DPMServer | where {$_.FriendlyName -eq $NamePG}
    $ds = Get-Datasource -ProtectionGroup $pg
    $rp = Get-RecoveryPoint -Datasource $ds | where {($_.RepresentedPointInTime).toString() -eq '11.04.2011 14:41:33'}
    $ri = get-recoverableItem -BrowseType child -Recoverableitem $rp
    $ro = New-RecoveryOption -HyperVDatasource -RecoveryType Recover -RecoveryLocation OriginalServer -TargetServer $DPMServer -TargetLocation OriginalServer
    Recover-RecoverableItem -RecoveryOption $ro -RecoverableItem $ri
    

     

    powershell crashes

     

    Problem signature:
     Problem Event Name: PowerShell
     NameOfExe: powershell.exe
     FileVersionOfSystemManagementAutomation: 6.1.7600.16385
     InnermostExceptionType: System.NullReferenceException
     OutermostExceptionType: System.Reflection.TargetInvocation
     DeepestPowerShellFrame: unknown
     DeepestFrame: System.RuntimeMethodHandle._InvokeMethodFast
     ThreadName: unknown
     OS Version: 6.1.7600.2.0.0
    


     

     


    • Moved by MarcReynolds Friday, May 20, 2011 3:15 PM (From:Data Protection Manager)
    •  

All Replies

  • Friday, May 20, 2011 8:54 PM
    Moderator
     
     

    Hi Vitaly Belskih

     

    By any change do you have file PowerShell.exe.config under  C:\Windows\System32\WindowsPowerShell\v1.0 on your  DPM  server?

    If you do, can you share its content?


    Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights
  • Sunday, November 11, 2012 9:38 AM
    Moderator
     
     Answered

    Hi, As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as "Answered". Either the previous steps should be helpful for many similar scenarios and will be marked as answer, or this post will be marked as answer in order to close the thread. Feel free to re-open the thread if you have additional information about this specific case or to open a new thread for a new case. In addition, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks,


    Bob Cornelissen - BICTT (My Blog about SCOM) - MVP 2012 and Microsoft Community Contributor 2011 + 2012 Recipient