JSON Template for Creating a Recovery Plan Using PowerShell RRS feed

All replies

  • Hello,

    I'm attempting to create a new recovery plan in ASR using the PowerShell and the commandlet with a JSON file for import. I was able to use the Get command to export a JSON from an existing Recovery Plan but when I modify the contents of the JSON to reflect a new Recovery Plan I cant seem to get it to work.  Does anyone have a template I can use for this or some additional documentation on the process?



    I also posted this same question here as I didnt see this forum at first and it seemed like a better fit.

    Thursday, September 12, 2019 4:35 PM
  • Do you get any error message after modifying the JSON template?

    Please share the template that isn't working. We will evaluate the template and point you in the right direction if we find any issues with it.

    Friday, September 13, 2019 6:37 AM
  • Hi Sadiqh!

    Below is the error and the items I modified in the JSON that was saved via

    Get-AzureRmRecoveryServicesAsrRecoveryPlan -path

    PS C:\temp> New-AzureRmRecoveryServicesAsrRecoveryPlan -Path C:\temp\OnClickSharePointTestFailover.json
    New-AzureRmRecoveryServicesAsrRecoveryPlan : Operation failed.
    Value cannot be null.
    Parameter name: value
    At line:1 char:1
    + New-AzureRmRecoveryServicesAsrRecoveryPlan -Path C:\temp\OnClickShare ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [New-AzureRmReco...AsrRecoveryPlan], Exception
        + FullyQualifiedErrorId : Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.NewAzureRmRecoveryServicesAsrRecoveryPlan

    These are the fields I modified in the JSON file that pointed back to the recovery plan I exported.  

    "friendlyName": "TestImportOnClickSharePointTestFailover",
    "name": "TestImportOnClickSharePointTestFailover",

    Friday, September 13, 2019 1:55 PM
  • It worked for me. Not sure what is causing issue on your end. You may send an email to AzCommunity [at] Microsoft dot com attaching the full JSON file so that I can try once again. However, if you need quick resolution I recommend reaching out to Azure technical support team by creating a support request.

    Tuesday, September 17, 2019 1:30 PM
  • Sadiqh would you mind providing a step by step on the process you followed with the commandlets and JSON file?  Maybe I'm just missing a parameter or something silly.

    I'll also send my full JSON to the address above.  Should I put anything in the subject or body to make it easy for you to find?


    Wednesday, September 18, 2019 8:41 PM
  • Subject: ATTN: Sadiqh and this forum link for context.

    Friday, September 20, 2019 10:21 AM
  • Sadiqh just an FYI that I sent over the JSON this morning.  Please let me know if you need anything additional from this end and thanks!
    Tuesday, September 24, 2019 2:41 AM