How to Set Up Script Actions
The script actions editor allows the administrator to create actions to be performed during MED-V workspace setup, as well as to define the order in which they are performed.
The following is a list of actions that can be added to the domain setup script:
Restart Windows—Restart Windows.
Join Domain—If joining a domain, include this action and configure the user name, password, fully qualified domain name, NetBIOS domain name, and organization unit (optional).
Check Connectivity—Configure a server to connect to and verify that the MED-V workspace can connect to a network resource (such as the domain server).
Command Line—Configure a script in the MED-V workspace, and enter a command line that includes the path of the script and the script arguments.
Rename Computer—Rename the virtual machine computer based on the defined settings.
Disable Auto-Logon—Disable Windows Auto-Logon. This action should be added at the end of scripts that add the computer to the domain.
How to Set Up Script Actions
To set up script actions
On the VM Setup tab, click Script Editor.
In the Script Actions dialog box, click Add, and on the submenu, click the desired actions.
Configure the actions as described in the following tables.
Rename Computer is configured in the VM Settings tab. For more information, see How to Configure VM Computer Name Pattern Properties.
To rename a computer, Windows must be restarted. It is recommended to add a Restart Windows action following a Rename Computer action.
Set the order of the actions by selecting an action and clicking Up or Down.
When running the Join Domain script, for the script to work, the user logged into the MED-V workspace virtual machine must have local administrator rights.
When running the Disable Auto-Logon script, it is recommended to disable the local guest account used for the auto-logon once the initial setup is complete.
Join Domain Properties
Credentials to use when joining the VM to the domain
Select one of the following credentials to use when joining the VM to the domain:
The credentials you enter are visible to all MED-V workspace users. It is not recommended to provide domain administrator credentials.
Domain to join
Select one of the following:
An organization unit (OU) may be specified to join the computer to a specific OU. The format must follow an OU distinguished name: OU=<Organization Unit>,<Domain Controller> (for example, OU=QATest, DC=il, DC=MED-V, DC=com).
Only a single level OU is supported as is shown in the example above.
Check Connectivity Properties
The IP Address of the server that you are verifying connection to.
The port of the server that you are verifying connection to.
The number of seconds to wait for a response before timing out.
The path of the command line.
Wait for exit
Select the check box to wait for a return before continuing with the script actions.
Fail on error
Select this check box if the return is anything but the value specified.
Enter the value that will indicate the command as a success.
Perform only once
Select this check box to run the command line only once. If the script fails or is canceled, this command will not be performed again.
This command line causes a restart of Windows in the Workspace
Select this check box if the command line causes a restart after completion.
Select this check box if the command will require user interaction.
Message to be displayed to the user while the command is running.
Message to be displayed to the user if the command fails.
When configuring the command-line action, several variables can be used as defined in the following table.
An authenticated user name.
MED-V authenticated user name. The user name and password can be used in the join domain VM setup script.
An authenticated password.
MED-V authenticated password. The user name and password can be used in the join domain VM setup script.
The domain configured in the MED-V authentication. It can be used on the VM setup script.
The unique computer name configured in the management application. It can be used in the VM setup script.