Changes properties of a virtual machine template used in VMM.
Description
Changes one or more properties of a virtual machine template used in a System Center Virtual Machine Manager (VMM) environment.
Properties that you can change include settings for the name of the template, its description, owner, organization name, time zone, operating system, and product key; BIOS boot order; CPU number and characteristics; the amount memory on the host that is assigned to a virtual machine; the amount of bandwidth on the host's network available to a virtual machine; whether a virtual machine created with this template will be highly available (i.e., deployed on a host that is part of a host cluster); values for domain or workgroup as well as domain credentials; a point quota that specifies how many new virtual machines self-service users can create; custom fields; and other options.
Changes that you make to a template affect only the template. Changes do not affect any existing virtual machines that were previously created by using this template.
If you want to change the properties of a a virtual disk drive, virtual floppy drive, virtual DVD drive, virtual network adapter, virtual SCSI adapter or virtual COM port associated with a specific template, you can use Set-SCVirtualDiskDrive, Set-SCVirtualFloppyDrive, Set-SCVirtualDVDDrive, Set-SCVirtualNetworkAdapter, Set-SCVirtualScsiAdapter, or Set-SCVirtualCOMPort cmdlets, respectively.
For more information about Set-SCVMTemplate, type: "Get-Help Set-SCVMTemplate -online".
Parameters
VMTemplate
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
0
Specifies a VMM template object used to create virtual machines.
AnswerFile
Required?
false
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a script object stored in the VMM library to use as an answer file. The name of the answer file script depends on the operating system that you want to install on a virtual machine:
ANSWER FILE GUEST OS TO INSTALL ON VM
----------- -------------------------
Sysprep.inf Windows XP, Windows Server 2000, or Windows Server 2003
Unattend.xml Windows Vista, Windows 7, or Windows Server 2008
ApplicationProfile
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies an application profile object.
AutoLogonCount
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the number of times that Windows should automatically log the administrator denoted in the Answerr File on to the console session.
AutoLogonCredential
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the Run As account contained in the Answer File that Windows uses to log on to the console session when automatic administrator logon is enabled.
BlockDynamicOptimization
Required?
false
Accept Pipeline Input?
false
Position?
named
Indicates whether dynamic optimization is blocked for a virtual machine.
BootOrder
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the order of devices that a virtual machine on a Hyper-V host uses to start up. Valid values are: CD, IDEHardDrive, PXEBoot, Floppy.
Example format: -BootOrder PXEBoot,IDEHardDrive,CD,Floppy
CapabilityProfile
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a capability profile object.
ComputerName
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: FQDN, IPv4 or IPv6 address, or NetBIOS name.
NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.
CostCenter
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the cost center for a virtual machine so that you can collect data about the allocation of virtual machines (or resources allocated to virtual machines) to make use of in your billing system.
CPUCount
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the number of CPUs on a virtual machine, on a hardware profile, or on a template. See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.
TYPE OF HOST NUMBER OF PROCESSORS
------------ --------------------
Hyper-V Up to 4 CPUs per VM; varies by guest OS
VMware ESX Up to 4 CPUs per VM for any supported guest OS
Exception: 1 CPU on a VM running Windows NT 4.0
Citrix XenServer Up to 8 CPUs per VM; varies by guest OS
CPUExpectedUtilizationPercent
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.
CPULimitForMigration
Required?
false
Accept Pipeline Input?
false
Position?
named
Limits, when set to $True, processor features for the specified virtual machine in order to enable migration to a physical computer that has a different version of the same processor as the source computer. VMM does not support migrating virtual machines between physical computers that have processors from different manufacturers.
CPULimitFunctionality
Required?
false
Accept Pipeline Input?
false
Position?
named
Enables running an older operating system (such as Windows NT 4.0) on a virtual machine deployed on a Hyper-V host or on a VMware ESX host by providing limited CPU functionality for the virtual machine.
CPUMaximumPercent
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the highest percentage of the total resources of a single CPU on the host that can be used by a specific virtual machine at any given time.
Example: -CPUMaximumPercent 80 (to specify 80 per cent)
CPURelativeWeight
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the amount of CPU resources on a host that this virtual machine can use relative to other virtual machines on the same host. A virtual machine with a higher setting is allocated more CPU resources than a virtual machine with a lower setting.
TYPE OF HOST RANGE OF RELATIVE VALUES
------------ ------------------------
Hyper-V 1 to 10000
VMware ESX 2000 = High
1500 = Above Normal
1000 = Normal (default)
750 = Below Normal
500 = Low
1 to 1000000 = Custom
The VMware term for these values is "shares."
Citrix XenServer 1 to 65536, normal is 256
NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.
CPUReserve
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the minimum percentage of the resources of a single CPU on the host to allocate to a virtual machine. The percentage of CPU capacity that is available to the virtual machine is never less than this percentage.
CPUType
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the type of CPU for a virtual machine. To retrieve a list of all CPU types that are available for use in virtual machines in a VMM environment, type: "Get-SCCPUType"
Custom1
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Custom10
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Custom2
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Custom3
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Custom4
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Custom5
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Custom6
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Custom7
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Custom8
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Custom9
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a custom property on a VMM object.
Description
Required?
false
Accept Pipeline Input?
false
Position?
named
States a description for the specified object.
DisableAutoLogon
Required?
false
Accept Pipeline Input?
false
Position?
named
Disables automatic administrator logon.
DiskIops
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the number of disk input/output operations per second (IOPS) on the host that can be used by a specific virtual machine.
Example: -DiskIO 1500 (to specify 1500 IOPS).
Domain
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a fully qualified domain name (FQDN) for an Active Directory domain.
Example format: -Domain "Domain01.Corp.Contoso.com"
DomainJoinCredential
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the user name and password of an account with permission to join a computer to the domain. A limited rights account should be used for joining computers (either physical or virtual) to the domain.
Example format for a PS credential:
$DomainJoinCredential = Get-Credenital
-Domain "ThisDomain.Corp.Contoso.com" -DomainJoinCredential $DomainJoinCredential
Example format for a Run As account:
$DomainJoinCredential = Get-SCRunAsAccount -Name "RunAsAcct01"
-Domain "ThisDomain.Corp.Contoso.com" -DomainJoinCredential $DomainJoinCredential
NOTE: You can use the DomainJoinCredential parameter to specify credentials (on a VMHostProfile) for joining a physical host computer to the domain, or to specify credentials (on a new or existing template, on a new or existing guest operating system profile, or on a new virtual machine) for joining a virtual machine to the domain.
DomainJoinOrganizationalUnit
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the organizational unit to which the computer is joined during an unattended mini-setup.
DynamicMemoryBufferPercentage
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the percentage of memory above a virtual machine’s current memory allocation which the host should try to reserve as a buffer. The default value is 20
Example format: -DynamicMemoryTargetBufferPercentage 20
DynamicMemoryEnabled
Required?
false
Accept Pipeline Input?
false
Position?
named
Enables, when set to $True, dynamic memory for virtual machines. You can enable dynamic memory directly on a virtual machine, or on a template or hardware profile that will be used to create virtual machines. The default value is False.
REQUIRED: You can enable dynamic memory for a virtual machine only if that virtual machine is deployed on a host running Windows Server 2008 SP1 or later or if the virtual machine is stored in a library in a stopped state (hardware changes to a stored virtual machine can only be made if the virtual machine does not have snapshots). Enabling dynamic memory on a virtual machine stored in a library will limit placement of that machine to hosts running Windows Server 2008 SP1 or later.
Example format: -DynamicMemoryEnabled $True
DynamicMemoryMaximumMB
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the maximum amount of memory that can be allocated to a virtual machine if dynamic memory is enabled. The default value is 65536.
REQUIRED: You can enable dynamic memory for a virtual machine only if that virtual machine is deployed on a host running Windows Server 2008 R2 SP1 or later or if the virtual machine is stored in a library in a stopped state (hardware changes to a stored virtual machine can only be made if the virtual machine does not have snapshots). Enabling dynamic memory on a virtual machine stored in a library will limit placement of that machine to hosts running Windows Server 2008 R2 SP1 or later.
Example format: -DynamicMemoryMaximumMB 1024
Enabled
Required?
false
Accept Pipeline Input?
false
Position?
named
Enables an object when set to $True, or disables an object when set to $False. For example, if you want to upgrade software on a virtual machine template, you can disable the template object in the VMM library to temporarily prevent users from using that object.
FullName
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the name of the person in whose name a virtual machine is registered.
GuiRunOnceCommands
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies one or more commands to add to the [GuiRunOnce] section of an unattended answer file (such as Unattend.xml). Use single quotes around each string enclosed in double quotes.
Example format:
-GuiRunOnceCommands '"C:\APF\APFPostSysPrepCopy.cmd PARAMS1"', '"C:\APF\APFPostSysPrepCopy.cmd PARAMS1"'
For information about how Windows PowerShell uses quotes, type: "Get-Help about_Quoting_Rules"
HighlyAvailable
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies that a virtual machine will be placed on a Hyper-V host that is part of a host cluster. Configure this setting on a virtual machine, or on a template or hardware profile that will be used to create virtual machines.
JobGroup
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.
JobVariable
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies that job progress is tracked and stored in the variable named by this parameter.
LocalAdministratorCredential
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the user name and password for the local Administrator account. Specifying credentials on a new or existing template, on a new or existing guest operating system profile, or on a new virtual machine overrides any existing Administrator password.
MemoryMB
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies, in megabytes (MB), the amount of random access memory (RAM) on the host that is allocated to a virtual machine. The default value is 512 MB. For a virtual machine on which dynamic memory is enabled (on a host running Windows Server 2008 R2 SP1 or later), use MemoryMB to specify the startup memory value.
TYPE OF HOSTMAXIMUM HOST MEMORY ASSIGNABLE TO VM
------------------------------------------------
Hyper-V Up to 65536 MB RAM per virtual machine
VMware ESX Server 3.0.x Up to 16384 MB RAM per virtual machine
VMware ESX Server 3.5.x Up to 65532 MB RAM per virtual machine
Citrix XenServer Up to 32265 MB RAM per VM
Example format: -MemoryMB 1024
MemoryWeight
Required?
false
Accept Pipeline Input?
false
Position?
named
Indicates the priority in allocating memory to a virtual machine, relative to other virtual machines on the same host. A virtual machine with a higher setting is allocated more memory resources than a virtual machine with a lower setting.
For a host running Windows Server 2008 R2 SP1 or later, 5000 = Normal, 10000 = High, 0 = Low, 1 to 10000 = Custom.
NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.
MergeAnswerFile
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies that the cmdlet merge the specified answer file with the specified guest operating system settings. The default value is TRUE. This parameter is used by the VMM console. You do not need to use this parameter at the command prompt.
MonitorMaximumCount
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the maximum number of monitors supported by a virtual video adapter.
Example format: -MonitorMaximumCount 3
MonitorMaximumResolution
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies, as a string, the value that represents the maximum possible monitor resolution of a virtual video adapter. Valid values are: "1024x768", "1280x1024", "1600x1200", "1920x1200". Default value: "1280x1024"
Example format: -MonitorResolutionMaximum "1600x1200"
Name
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the name of a VMM object.
NetworkUtilizationMbps
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies, in megabits per second (Mbps), the amount of bandwidth on the host's network that can be used by a specific virtual machine.
Example format: -NetworkUtilization 10
NumLock
Required?
false
Accept Pipeline Input?
false
Position?
named
Enables the BIOS value for NumLock on a virtual machine (or on a template or hardware profile that is used to create virtual machines) on a Hyper-V host. This parameter does not apply to virtual machines on VMware ESX hosts, or on Citrix XenServer hosts.
OperatingSystem
Required?
false
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies the type of operating system for a virtual machine. To list the names of all available operating systems in VMM, type: "Get-SCOperatingSystem".
OrganizationName
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the name of the organization for the person in whose name a virtual machine is registered.
Owner
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the owner of a VMM object in the form of a valid domain user account.
Example format: -Owner "Contoso\ReneeLo"
Example format: -Owner "ReneeLo@Contoso"
ProductKey
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a product key. The product key is a 25-digit number that identifies the product license. A product key can be used to register VMM or an operating system to be installed on a virtual machine or host.
PROTipID
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
QuotaPoint
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a quota that limits the number of virtual machines self-service users can deploy.
RemoveCapabilityProfile
Required?
false
Accept Pipeline Input?
false
Position?
named
Removes one or more specified capability profile objects.
RemoveDomainJoinOrganizationalUnit
Required?
false
Accept Pipeline Input?
false
Position?
named
Removes the organizational unit that the computer joined during setup.
RemoveServerFeatures
Required?
false
Accept Pipeline Input?
false
Position?
named
Removes all server roles and features from a template.
RunAsynchronously
Required?
false
Accept Pipeline Input?
false
Position?
named
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
SQLProfile
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a SQL Server profile object.
Tag
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a word or phrase to associate with an object so that you can search for all objects with the specified set of tags. You can search for a subset of tags, or you can search for the full set of tags.
TimeZone
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a number (an index) that identifies a geographical region that shares the same standard time. For a list of time zone indexes, see "Microsoft Time Zone Index Values" at: http://go.microsoft.com/fwlink/?LinkId=120935. If no time zone is specified, the default time zone used for a virtual machine is the same time zone setting that is on the virtual machine host.
Example format to specify the GMT Standard Time zone: -TimeZone 085
UnattendSettings
Required?
false
Accept Pipeline Input?
false
Position?
named
Key Value pairs of String, String
UserRole
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a user role object.
VirtualVideoAdapterEnabled
Required?
false
Accept Pipeline Input?
false
Position?
named
Enables, when set to $True, the Microsoft Synthetic 3D Virtual Video Adapter for virtual machines. You can enable the Virtual Video Adapter directly on a virtual machine, or on a template or hardware profile that will be used to create virtual machines.
REQUIRED: You can enable the Microsoft Synthetic 3D Virtual Video Adapter for a virtual machine only if that virtual machine is deployed on a host running Windows Server 2008 R2 SP1 (with the Remote Desktop Services role and Remote Desktop Virtual Graphics role service installed) or later or if the virtual machine is stored in a library in a stopped state (hardware changes to a stored virtual machine can only be made if the virtual machine does not have snapshots). Enabling the Microsoft Synthetic 3D Virtual Video Adapter on a virtual machine stored in a library will limit placement of that machine to hosts running Windows Server 2008 R2 SP1 (with the Remote Desktop Services role and Remote Desktop Virtual Graphics role service installed) or later.
Example format: -VirtualVideoAdapterEnabled $TRUE
Workgroup
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies on a new or existing template, on a new or existing guest operating system profile, or on a new virtual machine the name of the workgroup to which you want to join a virtual machine. You can use this parameter to override the existing value on a template or on a guest operating system profile.
Requires a VMM virtual machine template object, which can be retrieved by using the Get-SCVMTemplate cmdlet.
Examples
1: Specify an amount of memory for an
existing virtual machine template.
The first command gets the virtual machine template object named VMTemplate01 from the VMM library and stores the object in the $Template variable.
The second command changes the memory value for VMTemplate01 to 1024 MB. This is the amount of memory on the host that a virtual machine created by using this template will use.
2: Specify a new owner for multiple
highly available virtual machine templates.
PS C:\> $VMTemplates = Get-SCVMTemplate | where {$_.IsHighlyAvailable}
PS C:\> foreach ($VMTemplate in $VMTemplates) {Set-SCVMTemplate $VMTemplate -Owner "Contoso\NevenSokec"}
The first command gets all highly available virtual machine template objects and stores the objects in the $VMTemplates object array.
The second command uses a foreach loop to specify a new owner for each of the templates in the $VMTemplates array.
For information about the standard Windows PowerShell foreach loop statement, type: "Get-Help about_ForEach".
3: Specify a new owner for all virtual
machine templates that have the same owner.
This command gets all virtual machine template objects from the VMM library, selects only those objects whose owner is "Contoso\ReneeLo", and then passes each object to the Set-SCVMTemplate cmdlet which changes the owner to Contoso|NevenSokec.
4: Enable Dynamic Memory for an
existing virtual machine template.
The first command gets the virtual machine template object named VMTemplate04 from the VMM library and stores the object in the $VMTemplate variable.
The second command enables Dynamic Memory, changes the startup memory value for VMTemplate04 to 1024 MB (this is the amount of memory on the host that a virtual machine created by using this template will be allocated upon startup) and sets the maximum memory value to 2048 MB (this is the maximum amount of memory that can be allocated to a virtual machine created by using this template). A virtual machine using Dynamic Memory can only be deployed on a host that is running Windows Server 2008 R2 SP1 or later.