title: Move Azure resources to another subscription using Powershell
body: <p>I am attempting to move a resource group (that contains a VM with its dependant resources e.g. network interface etc) to a new subscription and resource group. (the move works fine if done via the GUI)</p>
  
  <p>My Script:</p>
  
  <pre><code>foreach ($resource in $resources) {Move-AzureRmResource
  -DestinationResourceGroupName "newresourcegroup" -ResourceId $resource.resourceID -DestinationSubscriptionId 123456}
  </code></pre>
  
  <p>Its failing with </p>
  
  <blockquote>
    <p>Move-AzureRmResource :
    {"error":{"code":"ResourceMoveProviderValidationFailed","message":"Resource
    move validation failed. Please see details. Diagnostic information:
    timestamp</p>
  </blockquote>
  
  <p>etc...</p>
  
  <blockquote>
    <p>"The move resources request does not contain all the dependent 
    resources. Please check error details for missing resource
    ids.\"}],\"code\":\"MissingMoveDependentResources\",\"message\":\"The
    move resources request does not contain all the dependent  resources.
    Please check error details for missing resource 
    ids.\"}}"},{"target":"Microsoft.Network/networkInterfaces","message":"{\"error\":{\"code\":\"MissingMoveDependentResources\",\"message\":\"The
    move resources request does not contain all  the dependent resources.
    Please check details for missing resource Ids</p>
  </blockquote>
  
  <p>Clearly I need to specify the dependant resources somehow, but there doesn't appear to be a parameter for "dependant resources" for the Move-AzureRmResource module.</p>
  
  <p>a. How can I determine what the dependant resources are?</p>
  
  <p>b. How do I specify them in the move cmdlet?</p>