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.

Variable

Description

%Workspace

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

%User

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

%Domain

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

%Hostname

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

%VMName

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.

Variable

Description

%MEDVUser%

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

%MEDVPassword%

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

%MEDVDomain%

The domain configured in the MED-V authentication. It can be used on the VM setup script.

%DesiredMachineName%

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: https://blogs.technet.com/appv/
The WSUS Support Team blog: https://blogs.technet.com/sus/
The SCMDM Support Team blog: https://blogs.technet.com/mdm/
The ConfigMgr Support Team blog: https://blogs.technet.com/configurationmgr/
The OpsMgr Support Team blog: https://blogs.technet.com/operationsmgr/
The SCVMM Team blog: https://blogs.technet.com/scvmm/
The MED-V Team blog: https://blogs.technet.com/medv/
The DPM Team blog: https://blogs.technet.com/dpm/
The OOB Support Team blog: https://blogs.technet.com/oob/
The Opalis Team blog: https://blogs.technet.com/opalis

clip_image001 clip_image002