Skip to content

Instantly share code, notes, and snippets.

@pkirch
Created March 30, 2015 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkirch/dc38e572bd829e68ed8e to your computer and use it in GitHub Desktop.
Save pkirch/dc38e572bd829e68ed8e to your computer and use it in GitHub Desktop.
This sample shows how to get the latest VM image for the image family "Windows Server 2012 R2 Datacenter" via PowerShell in Azure.
$images | Where-Object -Property ImageFamily -eq "Windows Server 2012 R2 Datacenter" | Format-List -Property ImageName, Label, PublishedDate
<# Output
ImageName : a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201410.01-en.us-127GB.vhd
Label : Windows Server 2012 R2 Datacenter, October 2014
PublishedDate : 28.10.2014 08:00:00
ImageName : a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201411.01-en.us-127GB.vhd
Label : Windows Server 2012 R2 Datacenter, November 2014
PublishedDate : 14.11.2014 09:00:00
ImageName : a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201412.01-en.us-127GB.vhd
Label : Windows Server 2012 R2 Datacenter, December 2014
PublishedDate : 11.12.2014 09:00:00
#>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment