Monday, January 19, 2015

PowerShell to Retrieve OS Image family from Azure

Azure is an ever changing.  At times I have PowerShell that provision certain image from the Azure Library, but the naming of the image keeps changing.

Once the Azure account is established to the local server PowerShell, I would use the script below to retrieve example all Windows 2012 family in Azure.

$osimage = (Get-AzureVMImage | where {$_.ImageFamily -like "Windows Server 2012 *"} | sort PublishedDate -Descending)[0].ImageName

Once that’s done, I’ll just display by key in


End result looks like this :


Thank you and hopes this helps.

keynote : OS Deployment from Azure, OS Image, osimage from Azure, Azure, Windows 2012 from Azure, Image from Azure