I need to create a VM in locationA
from Image ImageB
which is in locationB
using powershell. Since I'm not able to do it I'm trying to create a copy of ImageB
into locationA
, so that it will easy for me to create the VM.
I have searched for scripts to copy the images and got many results. I found one particular link which has simple script to copy images. But it is AzureCLI cmdlets. I need powershell scripts to do the job as the tool I'm using understands only powershell scripts.
I have searched for an equivalent powershell script but couldn't find any.Can anyone help me here.
Here is a script to copy the image. You could create a snapshot and copy it to anther region, then create the image.
Create a snapshot:
Copy the snapshot:
Create the image:
For more details, refer to this link.