Looking for powershell command to check if a resource in RG/Subscription can be moved to a new RG/Subscription
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@mganeshphani Your question has been shared with the content owner for further review.
@femsulu Thankyou. I did find a rest API which helps in this regard
https://docs.microsoft.com/en-us/rest/api/resources/resources/validatemoveresources
and also think I can use following command to invoke the api action mentioned above
https://docs.microsoft.com/en-us/powershell/module/azurerm.resources/invoke-azurermresourceaction?view=azurermps-6.1.0
however would appreciate if there is a PowerShell command already abstracting this API action.. rather than me creating the functionality myself
@mganeshphani - thanks for your question. Currently, there is not a PowerShell command for validating a move operation. The best place to request that addition is the product feedback forum.
@mganeshphani We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.
I have created this Powershell wrapper around the API in order to simplify this process.
https://gallery.technet.microsoft.com/Validate-Move-Resources-854bf278?redir=0
@nemanja-jovic really nice job you have done there.
Please correct me if i'am not wrong. The script can only validate move inside the same subscription?
Do you have another one to validate the move to another subscription?
Most helpful comment
I have created this Powershell wrapper around the API in order to simplify this process.
https://gallery.technet.microsoft.com/Validate-Move-Resources-854bf278?redir=0