Set-SCVMTemplate

Applies To: System Center 2012 - Virtual Machine Manager

Set-SCVMTemplate

Changes properties of a virtual machine template used in VMM.

Syntax

Parameter Set: Default
Set-SCVMTemplate [-VMTemplate] <Template> [-AnswerFile <Script> ] [-ApplicationProfile <ApplicationProfile> ] [-AutoLogonCount <UInt32> ] [-AutoLogonCredential <RunAsAccount> ] [-BlockDynamicOptimization <Boolean> ] [-BootOrder <BootDevice[]> ] [-CapabilityProfile <CapabilityProfile> ] [-ComputerName <String> ] [-CostCenter <String> ] [-CPUCount <Byte> ] [-CPUExpectedUtilizationPercent <Int32> ] [-CPULimitForMigration <Boolean> ] [-CPULimitFunctionality <Boolean> ] [-CPUMaximumPercent <Int32> ] [-CPURelativeWeight <Int32> ] [-CPUReserve <Int32> ] [-CPUType <ProcessorType> ] [-Custom1 <String> ] [-Custom10 <String> ] [-Custom2 <String> ] [-Custom3 <String> ] [-Custom4 <String> ] [-Custom5 <String> ] [-Custom6 <String> ] [-Custom7 <String> ] [-Custom8 <String> ] [-Custom9 <String> ] [-Description <String> ] [-DisableAutoLogon] [-DiskIops <Int32> ] [-Domain <String> ] [-DomainJoinCredential <VMMCredential> ] [-DomainJoinOrganizationalUnit <String> ] [-DynamicMemoryBufferPercentage <Int32> ] [-DynamicMemoryEnabled <Boolean> ] [-DynamicMemoryMaximumMB <Int32> ] [-Enabled <Boolean> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-HighlyAvailable <Boolean> ] [-JobGroup <Guid> ] [-JobVariable <String> ] [-LocalAdministratorCredential <VMMCredential> ] [-MemoryMB <Int32> ] [-MemoryWeight <Int32> ] [-MergeAnswerFile <Boolean> ] [-MonitorMaximumCount <Int32> ] [-MonitorMaximumResolution <String> ] [-NetworkUtilizationMbps <Int32> ] [-NumLock <Boolean> ] [-OperatingSystem <OperatingSystem> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid> ] [-QuotaPoint <UInt32> ] [-RemoveCapabilityProfile] [-RemoveDomainJoinOrganizationalUnit] [-RemoveServerFeatures] [-RunAsynchronously] [-SQLProfile <SQLProfile> ] [-Tag <String> ] [-TimeZone <Int32> ] [-UnattendSettings <Dictionary<String>> ] [-UserRole <UserRole> ] [-VirtualVideoAdapterEnabled <Boolean> ] [-Workgroup <String> ] [ <CommonParameters>]

Parameter Set: SingleVM
Set-SCVMTemplate [-VMTemplate] <Template> [-AnswerFile <Script> ] [-ApplicationProfile <ApplicationProfile> ] [-AutoLogonCount <UInt32> ] [-AutoLogonCredential <RunAsAccount> ] [-BlockDynamicOptimization <Boolean> ] [-BootOrder <BootDevice[]> ] [-CapabilityProfile <CapabilityProfile> ] [-ComputerName <String> ] [-CostCenter <String> ] [-CPUCount <Byte> ] [-CPUExpectedUtilizationPercent <Int32> ] [-CPULimitForMigration <Boolean> ] [-CPULimitFunctionality <Boolean> ] [-CPUMaximumPercent <Int32> ] [-CPURelativeWeight <Int32> ] [-CPUReserve <Int32> ] [-CPUType <ProcessorType> ] [-Custom1 <String> ] [-Custom10 <String> ] [-Custom2 <String> ] [-Custom3 <String> ] [-Custom4 <String> ] [-Custom5 <String> ] [-Custom6 <String> ] [-Custom7 <String> ] [-Custom8 <String> ] [-Custom9 <String> ] [-Description <String> ] [-DisableAutoLogon] [-DiskIops <Int32> ] [-Domain <String> ] [-DomainJoinCredential <VMMCredential> ] [-DomainJoinOrganizationalUnit <String> ] [-DynamicMemoryBufferPercentage <Int32> ] [-DynamicMemoryEnabled <Boolean> ] [-DynamicMemoryMaximumMB <Int32> ] [-Enabled <Boolean> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-HighlyAvailable <Boolean> ] [-JobGroup <Guid> ] [-JobVariable <String> ] [-LocalAdministratorCredential <VMMCredential> ] [-MemoryMB <Int32> ] [-MemoryWeight <Int32> ] [-MergeAnswerFile <Boolean> ] [-MonitorMaximumCount <Int32> ] [-MonitorMaximumResolution <String> ] [-Name <String> ] [-NetworkUtilizationMbps <Int32> ] [-NumLock <Boolean> ] [-OperatingSystem <OperatingSystem> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid> ] [-QuotaPoint <UInt32> ] [-RemoveCapabilityProfile] [-RemoveDomainJoinOrganizationalUnit] [-RemoveServerFeatures] [-RunAsynchronously] [-SQLProfile <SQLProfile> ] [-Tag <String> ] [-TimeZone <Int32> ] [-UnattendSettings <Dictionary<String>> ] [-UserRole <UserRole> ] [-VirtualVideoAdapterEnabled <Boolean> ] [-Workgroup <String> ] [ <CommonParameters>]

Detailed 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

-AnswerFile<Script>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ApplicationProfile<ApplicationProfile>

Specifies an application profile object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-AutoLogonCount<UInt32>

Specifies the number of times that Windows should automatically log the administrator denoted in the Answerr File on to the console session.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-AutoLogonCredential<RunAsAccount>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BlockDynamicOptimization<Boolean>

Indicates whether dynamic optimization is blocked for a virtual machine.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-BootOrder<BootDevice[]>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-CapabilityProfile<CapabilityProfile>

Specifies a capability profile object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CostCenter<String>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-CPUCount<Byte>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-CPUExpectedUtilizationPercent<Int32>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-CPULimitForMigration<Boolean>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CPULimitFunctionality<Boolean>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CPUMaximumPercent<Int32>

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)

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-CPURelativeWeight<Int32>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-CPUReserve<Int32>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-CPUType<ProcessorType>

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"

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom1<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom10<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom2<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom3<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom4<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom5<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom6<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom7<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom8<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Custom9<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Description<String>

States a description for the specified object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-DisableAutoLogon

Disables automatic administrator logon.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DiskIops<Int32>

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).

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Domain<String>

Specifies a fully qualified domain name (FQDN) for an Active Directory domain.

Example format: -Domain "Domain01.Corp.Contoso.com"

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DomainJoinCredential<VMMCredential>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DomainJoinOrganizationalUnit<String>

Specifies the organizational unit to which the computer is joined during an unattended mini-setup.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DynamicMemoryBufferPercentage<Int32>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DynamicMemoryEnabled<Boolean>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DynamicMemoryMaximumMB<Int32>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Enabled<Boolean>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FullName<String>

Specifies the name of the person in whose name a virtual machine is registered.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-GuiRunOnceCommands<String[]>

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"

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HighlyAvailable<Boolean>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobGroup<Guid>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LocalAdministratorCredential<VMMCredential>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MemoryMB<Int32>

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 HOST MAXIMUM 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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MemoryWeight<Int32>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MergeAnswerFile<Boolean>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MonitorMaximumCount<Int32>

Specifies the maximum number of monitors supported by a virtual video adapter.

Example format: -MonitorMaximumCount 3

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MonitorMaximumResolution<String>

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"

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NetworkUtilizationMbps<Int32>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-NumLock<Boolean>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-OperatingSystem<OperatingSystem>

Specifies the type of operating system for a virtual machine. To list the names of all available operating systems in VMM, type: "Get-SCOperatingSystem".

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-OrganizationName<String>

Specifies the name of the organization for the person in whose name a virtual machine is registered.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Owner<String>

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"

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProductKey<String>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-QuotaPoint<UInt32>

Specifies a quota that limits the number of virtual machines self-service users can deploy.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-RemoveCapabilityProfile

Removes one or more specified capability profile objects.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RemoveDomainJoinOrganizationalUnit

Removes the organizational unit that the computer joined during setup.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RemoveServerFeatures

Removes all server roles and features from a template.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SQLProfile<SQLProfile>

Specifies a SQL Server profile object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Tag<String>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-TimeZone<Int32>

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: https://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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UnattendSettings<Dictionary<String>>

Key Value pairs of String, String

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserRole<UserRole>

Specifies a user role object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualVideoAdapterEnabled<Boolean>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMTemplate<Template>

Specifies a VMM template object used to create virtual machines.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Workgroup<String>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Template

Notes

  • 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.

PS C:\> $Template = Get-SCVMTemplate | where {$_.Name -eq "VMTemplate01"}
PS C:\> Set-SCVMTemplate -Template $Template -MemoryMB 1024

2: Specify a new owner for multiple highly available virtual machine templates.

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".

PS C:\> $VMTemplates = Get-SCVMTemplate | where {$_.IsHighlyAvailable}
PS C:\> foreach ($VMTemplate in $VMTemplates) {Set-SCVMTemplate $VMTemplate -Owner "Contoso\NevenSokec"}

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.

PS C:\> Get-SCVMTemplate -VMMServer "VMMServer01.Contoso.com" | where {$_.Owner -eq "Contoso\ReneeLo"} | Set-SCVMTemplate -Owner "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.

PS C:\> $VMTemplate = Get-SCVMTemplate | where {$_.Name -eq "VMTemplate04"}
PS C:\> Set-SCVMTemplate -VMTemplate $VMTemplate -DynamicMemoryEnabled $True -MemoryMB 1024 -DynamicMemoryMaximumMB 2048

Get-SCVMTemplate

New-SCVMTemplate

Remove-SCVMTemplate