This week I was at a customer site reviewing a Virtual Server 2005 R2 Deployment. At the customer site they had a mix of VM additions installed across the estate and no easy way of determining what the correct version numbers were. The first thing I needed was a list of VM addition numbers. This was provide to me by Brian Randell http://mcwtech.com/CS/blogs/brianr/archive/2008/10/10/virtual-pc-and-virtual-server-verison-numbers-as-well-as-additions.aspx
Someone asked today so I thought I'd share it here too.
Next thing I needed to do was create a vbs script to query the virual server and output to an HTML table. I have posted the script here. I have tested this on Windows 2003 and Virtual Server 2005 R2 Sp1. This code work on all Virtual Server versions. I have not tested on Hyper-V yet. My plan is to write a PowerShell script for Hyper-v. Enjoy!
<---Code Snipit---->
'=========================================================' Example Html table code from Name: WriteHTMLBrowser.vbs ' Author: Neal Walters ' http://VBScript-Training.com '=========================================================
'=========================================================' Name: getadditions.vbs ' Author: Duane Thomas' http://blogs.technet.com/virtualworld''This code is provided as is. No support is provided. Use at your own risk.'' Thanks Neal Walters for the html table code example. '=========================================================
On Error Resume Next
dim myfilename, fso, oshell, forReading, forWriting dim path, program, fullProgName, myTextStream, ynCreatedim objSet objVS = CreateObject("VirtualServer.Application")set colVMs = objVS.VirtualMachines
Set objGuestOS = objVM.GuestOSset fso = CreateObject("Scripting.FileSystemObject") set oshell = CreateObject("Wscript.Shell")
myfilename = "c:\vmaddition.html"
forReading = 1: forWriting = 2: ynCreate = 1 set myTextStream = fso.OpenTextFile(myfilename,forWriting,ynCreate)
myTextStream.Write "<h1>Virtual Machine Additions</H1>" myTextStream.Write "<table border=1 cellspacing=2 cellpadding=3>" & vbcrlf
myTextStream.Write "<tr>" & vbcrlf myTextStream.Write "<th>Name</td>" & vbcrlf myTextStream.Write "<th>Guest OS</td>" & vbcrlf myTextStream.Write "<th>VM Addition Version</td>" & vbcrlf
myTextStream.Write "</tr>" & vbcrlf
For Each objVM in colVMS myTextStream.Write "<tr>" & vbcrlf myTextStream.Write "<td>" & objVM.Name & "</td>" & vbcrlf myTextStream.Write "<td>" & objvm.GuestOS.OSName & "</td>" & vbcrlf myTextStream.Write "<td>" & objvm.GuestOS.AdditionsVersion & "</td>" & vbcrlf
myTextStream.Write "</tr>" & vbcrlf next
myTextStream.Write "</table>" & vbcrlf
myTextStream.Close
'path = "C:\Program Files\Internet Explorer"program = "IEXPLORE" 'FullProgname = path & "\" & program 'WScript.Echo FullProgname 'OShell.Run (program)OShell.Run (program & " " & myfilename)
PingBack from http://www.ditii.com/2008/10/11/vbs-script-to-find-out-virtual-pc-and-virtual-server-verison-numbers-as-well-as-additions/
Is there a new VPC/Virtual Server version coming out soon? What is the strategy?
Must have: , <a href="http://www.videocodezone.com/users/ef1c6s9/"">http://www.videocodezone.com/users/ef1c6s9/">nice">http://www.videocodezone.com/users/ef1c6s9/"">http://www.videocodezone.com/users/ef1c6s9/">nice cute girls</a>, [url="http://www.videocodezone.com/users/ef1c6s9/"">http://www.videocodezone.com/users/ef1c6s9/"]nice cute girls[/url], http://www.videocodezone.com/users/ef1c6s9/ nice cute girls,
Yeah, cool script!
But anyone can find out the version of the VM additions by clicking on Properties of the running VM in its first tab.