Complete Listing of MED-V Variables in Version 1.0 SP1

CMDThe following is a list of the entire default environment variables used by MED-V 1.0 Service Pack 1 organized by use context.

Variables Allowed for Renaming Computer during VM Setup

During the VM Setup process, there is an optional action to rename the computer. When configuring this process in the VM Setup tab, you will see an option for "VM Computer Name Pattern" near the bottom of the page.




The name of the MED-V workspace being used by this image during the VM setup.


The name of the user logged on to MED-V during the VM setup.


The domain name (short name) of the authenticating MED-V Active Directory domain.


The hostname of the physical machine running the MED-V Client using this workspace.


The name of the Virtual Machine name (Name of the virtual machine image file used by the workspace.)

Variables that can be used by Command Actions during the VM Setup Script

During the VM first time setup, there is an option to use a command line. The command line has its own set of variables that can be used with the command being used.




MED-V authenticated user name. The user name and password can be used in the join domain VM setup script.


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.

For example, a common task needed by many MED-V v1 administrators is a way to automate adding a regular MED-V user into the local administrator’s group. This is an example where use of this command line option with associated variables comes in very handy. In this particular case, we use the following command/argument combination:

Command: "c:\windows\system32\net.exe"

Arguments: "localgroup /add administrators %MEDVDomain%\%MEDVUser%"

Variable in the Guest

There is also a %MEDVHOSTNAME% variable that is set in the operating system of the guest virtual machine. It is a system variable that defaults to the host name of the host computer.

Steve Thomas | Senior Support Escalation Engineer

The App-V Team blog:
The WSUS Support Team blog:
The SCMDM Support Team blog:
The ConfigMgr Support Team blog:
The OpsMgr Support Team blog:
The SCVMM Team blog:
The MED-V Team blog:
The DPM Team blog:
The OOB Support Team blog:
The Opalis Team blog:

clip_image001 clip_image002