Retrieve the Latest Windows Azure VM Image Name

When we want to create a new Microsoft Azure VM using PowerShell, we need to specify the OS image.

The ImageName parameter is required by New-AzureVMConfig and New-AzureQuickVM cmdlets.

To get a list of all available images, we use the Get-AzureVMImage cmdlet.

This command will return a list of all images and details for each of them.

We can filter the results.

For example: if we want to get the list of all Windows Server 2012 R2 Datacenter images, we can use the following command:

Get-AzureVMImage | where { $_.ImageFamily -eq "Windows Server 2012 R2 Datacenter"}

This command still return several images.

If we want to use list just the last image released we order the images by the PublishedDate property and get the first item of the list.

(Get-AzureVMImage | where { $_.ImageFamily -eq "Windows Server 2012 R2 Datacenter"} |Sort-Object -Descending -Property PublishedDate)[0].ImageName

 

How to Upload Windows and Linux Virtual Machines to Azure

Upload Windows and Linux Virtual Machines to Azure with a few clicks using CtxAdmTools AzureUploadVM

 

Step 1: Connect to Azure.

Click on Connect to Azure button to sign in to Azure or
Quick Connect if you used Azure Upload VM before.

 

Azure Sign In

 

Step 2: enter Image File information.

First, select the Operating System. You can choose Windows or Linux.

Second, search for the image file (.vhd) to upload.

If you previously uploaded an image file with same name, enable the overwrite checkbox.

Finally, enter the name of the image being added to the Azure image repository.
Note: The image name can contain only letters, numbers, periods, hyphens, and underscores.

 

Azure Image Information

 

Step 3: select Azure Storage Account

First, select the Location. You can choose Regions or Affinity Groups.

Azure Select Location

 

After that, select an existing Storage Account or create a new one.

 

Azure Select Storage Account

 

If you choose to create a new Azure Storage Account:

Enter the name of the new Storage Account and then decide if you want to enable GeoReplication.

Note: GeoReplication probably is not required for mostly of VM images and will increase the cost of your monthly bill.

 

Azure Create New Storage Account

 

Step 4: upload the VM image

(required a Full Version License)

Click on the Upload Image button. Then relax.
This process will take lot of time (hours or even days).

 

Upload Azure VM Image

 

Done! Process completed!

 

Upload Azure VM Image Complete

 

Learn more about AzureUploadVM at http://azureuploadvm.ctxadmtools.com

Welcome to KopiCloud

KopiCloud is a blog about Windows and Citrix Automation on the Cloud.

Also, KopiCloud are tools under development to deploy Windows and Citrix servers on multi-cloud environments with few clicks and no code.

This blog is curated by Guillermo Musumeci, Founder and Chief Developer of KopiCloud and CtxAdmTools, a popular site for Windows and Citrix Automation Tools.

Here we will talk about deployment and automation on the Cloud (Amazon AWS, Microsoft Azure and Google Cloud) of Windows and Citrix servers.

Follow us on Twitter @kopicloud to stay tuned of new posts!

Thank you!

Guillermo Musumeci