POSTS
Discovering Windows Version on EC2 Instances
By Brian
One solution is to use the System log. If the instance has the EC2 Config service running on it it will report the OS version (along with a few key driver versions to the console). You can access the System Log from the console by right clicking on an instance and choosing "View System Log". For example, the output below is from a Windows 2003 R2 instance I just launched. Notice the OSVersion on line three.
|
|
I created a script that will query the system log (also called the console) from every Windows instance in every region using PowerShell. It then applies a regular expression to parse the OS version number.
|
|
You can see the sample output below. The last instance is Windows 2003 indicated by the version number 5.2. You can find a list of version numbers on Microsoft's Web Site.
|
|
Blogger is messing with the script a bit. You can download a copy here. Just rename it from .txt to .ps1.