Virtual Server scripting support

Virtual Server scripting support

Virtual Server 2005 has been developed to be fully manageable by using scripting. Virtual Server implements this support through Component Object Model (COM) technology. The COM interface and procedures have been built into Virtual Server, and can be used to access any virtual machine and almost all Virtual Server configuration settings.

Any scripting language that is capable of connecting to QCN automation objects will work with Virtual Server. Windows includes built-in support for Microsoft Visual Basic® Scripting Edition (VBScript) and Microsoft JScript® development software. With non-Microsoft software, you can use other scripting languages as well. Automation does not need to be in the form of scripts, however. You can manage Virtual Server by using other programming languages, such as C, C++, and C#.

Scripts are executed with Windows Script Host, the standard Windows operating system scripting environment. You can use any script program that Windows Script Host is capable of executing by using the following syntax: script_program script_name. For example, you can run a script named myscript.vbs by using CScript, the command-line version of Windows Script Host, as follows:

cscript myscript.vbs

Scripts are executed in a new process in the logon session of the network service account, under which the Virtual Server service is running. As a result, any user interface (UI) that the script may try to present will not be visible on the local computer. In general, you should not attempt to display UI from these scripts.

For more information about scripting and the Virtual Server object model, see the Virtual Server 2005 Programmer's Guide. For more information about using scripting with Virtual Server, see Using Scripts to Manage Virtual Server.