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.
Note Rename Computer is configured in the VM Settings tab. For more information, see How to Configure VM Computer Name Pattern Properties.
Note 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.
Click OK.
Note 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.
Note 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
Property | Description |
---|---|
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:
Note
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:
|
Organization Unit |
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).
Warning
Only a single level OU is supported as is shown in the example above. |
Check Connectivity Properties
Property | Description |
---|---|
IP Address |
The IP Address of the server that you are verifying connection to. |
Port |
The port of the server that you are verifying connection to. |
Timeout |
The number of seconds to wait for a response before timing out. |
Command-Line Properties
Property | Description |
---|---|
Path |
The path of the command line. |
Arguments |
Command-line arguments. |
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. Default: 0 |
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. |
Allow interaction |
Select this check box if the command will require user interaction. |
Progress message |
Message to be displayed to the user while the command is running. |
Failure message |
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.
Parameter | Value | Description |
---|---|---|
%MEDVUser% |
An authenticated user name. |
MED-V authenticated user name. The user name and password can be used in the join domain VM setup script. |
%MEDVPassword% |
An authenticated password. |
MED-V authenticated password. The user name and password can be used in the join domain VM setup script. |
%MEDVDomain% |
Configured domain. |
The domain configured in the MED-V authentication. It can be used on the VM setup script. |
%DesiredMachineName% |
Computer name. |
The unique computer name configured in the management application. It can be used in the VM setup script. |
Related topics
How to Configure the Virtual Machine Setup for a MED-V Workspace