Validate Move Resources - Powershell Azure API Wrapper

Very powerfull Powershell function which is meant to levearage the Azure API in order to send the query to the backend Azure Resource Manager(ARM) with the specifically constructed JSON body, which contains all resource IDs from the source resource group and the target resource

 
 
 
 
 
5 Star
(2)
221 times
Add to favorites
Windows Azure
1/15/2020
E-mail Twitter del.icio.us Digg Facebook
  • Target RG cannot be found
    3 Posts | Last post January 14, 2020
    • I am getting error that the target rg cannot be found.  Target RG exists in new sub in same tenant.  I have tried both 'TargetRG' and '/subscriptions/<SubscriptionID>/resourceGroups/TargetRG' as values and neither works.  Can you please help identify what I am doing wrong?  Thanks in advance, your script is on-of-a-kind!
    • Hi! I am wondering if you can find your resource group, just be executing simple get-azresourcegroup -name 'yourresourcegroup'
    • You can add me on Skype - nemanja.jovic_1 , we can try to troubleshoot your problem together.
  • Where are the results?
    2 Posts | Last post October 31, 2019
    • How do you view the results of the operation?  The API documentation indicates that you have to retrieve the URL listed in the "Location" property of the header to see results.  The script seems to initiate the operation but does not show results. 
      
      https://docs.microsoft.com/en-us/rest/api/resources/resources/validatemoveresources
      
      "If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation."
    • Hello Sam,
      I have sharped the code to wait for Azure AsyncOperation and return the response.
      Please check it out and thanks for the feedback.