Das nachfolgende VBS-Script gibt den Namen und die Versionsnummer über das WMI-Service per Echo-Method aus.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\

" & strComputer & "
ootcimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
Wscript.Echo objOperatingSystem.Caption & " " & _
objOperatingSystem.Version
Next