Set-SCHardwareProfile

Applies To: System Center 2012 - Virtual Machine Manager

Set-SCHardwareProfile

Changes the properties of a hardware profile used in VMM.

Syntax

Parameter Set: Default
Set-SCHardwareProfile [-HardwareProfile] <HardwareProfile> [-BootOrder <BootDevice[]> ] [-CapabilityProfile <CapabilityProfile> ] [-CPUCount <Byte> ] [-CPUExpectedUtilizationPercent <Int32> ] [-CPULimitForMigration <Boolean> ] [-CPULimitFunctionality <Boolean> ] [-CPUMaximumPercent <Int32> ] [-CPURelativeWeight <Int32> ] [-CPUReserve <Int32> ] [-CPUType <ProcessorType> ] [-Description <String> ] [-DiskIops <Int32> ] [-DynamicMemoryBufferPercentage <Int32> ] [-DynamicMemoryEnabled <Boolean> ] [-DynamicMemoryMaximumMB <Int32> ] [-HighlyAvailable <Boolean> ] [-JobGroup <Guid> ] [-JobVariable <String> ] [-MemoryMB <Int32> ] [-MemoryWeight <Int32> ] [-MonitorMaximumCount <Int32> ] [-MonitorMaximumResolution <String> ] [-Name <String> ] [-NetworkUtilizationMbps <Int32> ] [-NumLock <Boolean> ] [-Owner <String> ] [-PROTipID <Guid> ] [-RemoveCapabilityProfile] [-RunAsynchronously] [-UserRole <UserRole> ] [-VirtualVideoAdapterEnabled <Boolean> ] [ <CommonParameters>]

Detailed Description

The Set-SCHardwareProfile cmdlet changes one or more properties of a hardware profile object used in a System Center Virtual Machine Manager (VMM) environment. Properties that you can change include settings for boot order, CPU settings, the amount memory on the host that is assigned to a virtual machine, and other options.

To change the properties of a virtual floppy drive, virtual DVD drive, virtual COM port, virtual network adapter, or virtual SCSI adapter associated with a specific hardware profile, use the Set-SCVirtualFloppyDrive, Set-SCVirtualDVDDrive, Set-SCVirtualCOMPort, Set-SCVirtualNetworkAdapter, or Set-SCVirtualScsiAdapter cmdlets, respectively.

Changes made to a hardware profile affect only the hardware profile itself. The changes do not affect any existing virtual machines that were created by using this profile.

For more information about Set-SCHardwareProfile, type: "Get-Help Set-SCHardwareProfile -online".

Parameters

-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

-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

-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

-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

-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

-HardwareProfile<HardwareProfile>

Specifies a hardware profile object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

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

-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

-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?

true (ByValue)

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

-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?

true (ByValue)

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

-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

-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

-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

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

  • HardwareProfile

Examples

1: Specify an amount of memory for an existing hardware profile.

The first command gets the hardware profile object named NewHWProfile01 and stores the object in the $HWProfile variable.

The second command changes the memory value for NewHWProfile01 to 1024 MB.

PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile01" }
PS C:\> Set-SCHardwareProfile -HardwareProfile $HWProfile -MemoryMB 1024

2: Specify a new owner for multiple hardware profiles.

The first command gets the hardware profile objects that match the search criteria and stores the objects in the $HWProfiles object array.

The second command uses a foreach statement to specify a new owner for each of the profiles in the array.

For more information about the standard Windows PowerShell foreach loop statement, type: Get-Help about_ForEach.

PS C:\> $HWProfiles = Get-SCHardwareProfile | where {$_.Name -match "Profile"}
PS C:\> Foreach ($HWProfile in $HWProfiles) {Set-SCHardwareProfile -HardwareProfile $HWProfile -Owner "Contoso\Cesar"}

3: Specify a new boot order for multiple hardware profiles.

The first command gets all hardware profile objects the library that match the search criteria (the profile name contains the string "HWProfile") and stores the hardware profile objects in the $HWProfiles object array. Using the "@" symbol and parentheses ensures that the command stores the results in an array, in case the command returns a single object or a null value.

The second command uses a foreach statement to specify a new boot order for each hardware profile object in the $HWProfiles array.

PS C:\> $HWProfiles = @(Get-SCHardwareProfile | where {$_.Name -match "HWProfile"})
PS C:\> Foreach ($HWProfile in $HWProfiles) {Set-SCHardwareProfile -HardwareProfile $HWProfile -BootOrder PXEBoot,CD,IDEHardDrive,Floppy}

4: Search for hardware profiles with a specific configuration and append text to the description field.

The first command gets all hardware profile objects that match the search criteria (CPU Count is equal to 4) and stores the hardware profile objects in the $HWProfiles object array.

The second command uses a foreach statement to iterate through each profile object in the $HWProfiles array. For each profile, the Description text is stored to a variable ($Text), and then the Set-SCHardwareProfile cmdlet uses the Description parameter to append "(Contains 4 Processors)" to the contents of each instance of $Text.

PS C:\> $HWProfiles = @(Get-SCHardwareProfile | where {$_.CPUCount -eq 4})
PS C:\> Foreach ($HWProfile in $HWProfiles) {$Text = $HWProfile.Description; Set-SCHardwareProfile -HardwareProfile $HWProfile -Description $Text" (Contains 4 Processors)"}

5: Enable Dynamic Memory for an existing hardware profile.

The first command gets the hardware profile object named NewProfile5 and stores the object in the $HWProfile variable.

The second command enables Dynamic Memory for NewHWProfile05, changes the startup memory value to 1024 MB and sets the maximum memory value to 2048 MB.

PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile05" }
PS C:\> Set-SCHardwareProfile -HardwareProfile $HWProfile -DynamicMemoryEnabled $True -MemoryMB 1024 -DynamicMemoryMaximumMB 2048

Get-SCHardwareProfile

New-SCHardwareProfile

Set-SCVirtualCOMPort

Set-SCVirtualDVDDrive

Set-SCVirtualFloppyDrive

Set-SCVirtualNetworkAdapter

Set-SCVirtualScsiAdapter