You may think that if you're running a platform as a service application on Azure (PaaS), you never have to worry about the version of the operating system it is running because Microsoft upgrades it for you. This is true within an OS family if you have configured your operating system version for your PaaS roles as Automatic. It means that you have told Azure that it is ok to automatically upgrade the OS within the OS family specified (see example below):

 

Note that I'm differentiating version and family. At some point, the OS family will be deprecated and it is NOT automatically upgraded to a new family. As Microsoft continues to release new families of operating systems, older operating systems will eventually go out of support. For a deep dive into this policy, please see http://support.microsoft.com/gp/azure-cloud-lifecycle-faq. In the most extreme situation, if your PaaS application is running for more than 1 year on an OS family that has been announced as retired, your application will be stopped.

If you have several PaaS applications deployed on Azure, you may wish to inventory those that are running on the oldest OS family so that you can plan to repackage, test, and publish them on the latest supported OS family.

If you're in this situation, I have written a PowerShell script just for you. The script below will iterate over your subscriptions and report the OS details for your PaaS applications:

$namespace=@{ns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"}

foreach($subscription in Get-AzureSubscription) {

    Select-AzureSubscription -SubscriptionName $subscription.SubscriptionName

    $deployments=get-azureService | get-azureDeployment -ErrorAction Ignore | where {$_.SdkVersion -NE ""}

    $deployments | ft @{Name="SubscriptionName";Expression={$subscription.SubscriptionName}},

        ServiceName, SdkVersion, Slot,

        @{Name="osFamily";Expression={(select-xml -content $_.configuration -xpath "/ns:ServiceConfiguration/@osFamily" -namespace $namespace).node.value }},

        osVersion, Status, URL

}

 

The output will look similar to the below:

SubscriptionNa ServiceName SdkVersion Slot osFamily OSVersion Status Url

me

-------------- ----------- ---------- ---- -------- --------- ------ ---

Azdem169L41... omtaDemoApp 2.0.6493.2 Production 3 * Running http://omta...

Azdem169L41... omtatestsvc 2.0.6493.2 Production 1 * Running http://omta...

 

Guest OS family numbers are listed here: http://msdn.microsoft.com/en-us/library/windowsazure/ee924680.aspx

The above report says that I have one PaaS application running on OS family 3, which is Server 2012, and another running on OS family 1, which is Server 2008. It is time for me to repackage and update the latter PaaS application.

Hope this helps you!