Ben Armstrong shows you how to use GetConfigurationValue and SetConfigurationValue to change any value in the virtual machine configuration file. Ben claims "this can be very useful for getting access to some of the more esoteric features of Virtual Server for which a direct COM interface does not exist". The following script example uses APIs to check and set the mouse integration setting for a virtual machine.
Set vs = CreateObject("VirtualServer.Application")
set vm1 = vs.FindVirtualMachine(WScript.Arguments(0))
key = "integration/microsoft/mouse/allow"
currentValue = vm1.GetConfigurationValue(key)
Wscript.echo "The state of mouse integration on " & WScript.Arguments(0) & " is: " & currentValue
if currentValue then
newvalue = false
Else
newvalue = true
End if
result = vm1.SetConfigurationValue(key, cbool(newvalue))
Wscript.echo "The state of mouse integration on " & WScript.Arguments(0) & " has been set to: " & newvalue
This script takes the virtual machine name as a commond line parameter then gets the current value for the mouse integration setting and informs the user of the current value. It then changes the configuration value to be the opposite of what it used to be and then informs the user of the change.
Check out Ben's original post and leave him a comment, here.