List Basic Virtual Machine Information

 

Description
Lists configuration information for all the virtual machines on a computer.

 

Supported Platforms

Windows Server 2003

Yes

Windows XP

No

Windows 2000

No

Windows NT 4.0

No

Windows 98

No

 

Script Code

On Error Resume Next

Set objVS = CreateObject("VirtualServer.Application")
set colVMs = objVS.VirtualMachines

For Each objVM in colVMS
    Wscript.Echo "Account name: " & objVM.accountname
    Wscript.Echo "Account name and password: " & objVM.Accountnameandpassword
    Wscript.Echo "Autostart at launch: " & objVM.Autostartatlaunch
    Wscript.Echo "Autostart at launch delay: " & objVM.Autostartatlaunchdelay
    Wscript.Echo "Baseboard serial number: " & objVM.Baseboardserialnumber
    Wscript.Echo "BIOS GUID: " & objVM.BIOSGUID
    Wscript.Echo "BIOS serial number: " & objVM.BIOSerialNumber
    Wscript.Echo "Chassis asset tag: " & objVM.ChassisAssetTag
    Wscript.Echo "Chassis serial number: " & objVM.ChassisSerialNumber
    Wscript.Echo "Config ID: " & objVM.ConfigID
    Wscript.Echo "Display: " & objVM.Display
    Wscript.Echo "File: " & objVM.File
    Wscript.Echo "Floppy autodetect enabled: " & objVM.FloppyAutoDetectEnabled
    Wscript.Echo "Gues OS: " & objVM.GuestOS
    Wscript.Echo "Has MMX: " & objVM.HasMMX
    Wscript.Echo "Has SSE: " & objVM.HasSSE
    Wscript.Echo "Has SSE2: " & objVM.HasSSE2
    Wscript.Echo "Keyboard: " & objVM.Keyboard
    Wscript.Echo "Memory: " & objVM.Memory
    Wscript.Echo "Mouse: " & objVM.Mouse
    Wscript.Echo "Name: " & objVM.Name
    Wscript.Echo "Notes: " & objVM.Notes
    Wscript.Echo "Processor speed: " & objVM.ProcessorSpeed
    Wscript.Echo "Run as defined account: " & objVM.RunAsDefinedAccount
    Wscript.Echo "Saved state file path: " & objVM.SavedStateFilePath
    Wscript.Echo "Shutdown action on quit: " & objVM.ShutdownActionOnQuit
    Wscript.Echo "State: " & objVM.State
    Wscript.Echo "Undoable: " & objVM.Undoable
    Wscript.Echo "Undo action: " & objVM.UndoAction
    Wscript.Echo
Next
	

 

 

For online peer support, join the microsoft.public.windows.server.scripting community on the msnews.microsoft.com news server. To provide feedback or report bugs in sample scripts or the Scripting Guide, please contact Microsoft TechNet.

 

Disclaimer

 

This sample script is not supported under any Microsoft standard support program or service. The sample script is provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.