Set-SCHardwareProfile
Changes the properties of a hardware profile used in VMM.
Syntax
Set-SCHardwareProfile
[-HardwareProfile] <HardwareProfile>
[-HighlyAvailable <Boolean>]
[-HAVMPriority <UInt32>]
[-DRProtectionRequired <Boolean>]
[-ReplicationGroup <ReplicationGroup>]
[-SecureBootEnabled <Boolean>]
[-NumLock <Boolean>]
[-CPULimitFunctionality <Boolean>]
[-CPULimitForMigration <Boolean>]
[-Name <String>]
[-RemoveCapabilityProfile]
[-Owner <String>]
[-UserRole <UserRole>]
[-JobGroup <Guid>]
[-CapabilityProfile <CapabilityProfile>]
[-Description <String>]
[-MemoryMB <Int32>]
[-DynamicMemoryEnabled <Boolean>]
[-DynamicMemoryMaximumMB <Int32>]
[-DynamicMemoryBufferPercentage <Int32>]
[-MemoryWeight <Int32>]
[-VirtualVideoAdapterEnabled <Boolean>]
[-MonitorMaximumCount <Int32>]
[-MonitorMaximumResolution <String>]
[-RecoveryPointObjective <Int32>]
[-ProtectionProvider <ProtectionProvider>]
[-BootOrder <BootDevice[]>]
[-FirstBootDevice <String>]
[-SecureBootTemplate <String>]
[-CPUCount <Byte>]
[-CPUType <ProcessorType>]
[-CPUExpectedUtilizationPercent <Int32>]
[-DiskIops <Int32>]
[-NetworkUtilizationMbps <Int32>]
[-CPURelativeWeight <Int32>]
[-CPUReserve <Int32>]
[-CPUMaximumPercent <Int32>]
[-CPUPerVirtualNumaNodeMaximum <Byte>]
[-MemoryPerVirtualNumaNodeMaximumMB <Int32>]
[-VirtualNumaNodesPerSocketMaximum <Byte>]
[-DynamicMemoryMinimumMB <Int32>]
[-NumaIsolationRequired <Boolean>]
[-AutomaticCriticalErrorAction <UInt16>]
[-AutomaticCriticalErrorActionTimeout <Int32>]
[-CheckpointType <CheckpointType>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
The Set-SCHardwareProfile cmdlet changes one or more properties of a hardware profile object used in a 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.
Examples
Example 1: Specify an amount of memory for an existing hardware profile
PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile01" }
PS C:\> Set-SCHardwareProfile -HardwareProfile $HWProfile -MemoryMB 1024
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.
Example 2: Specify a new owner for multiple hardware profiles
PS C:\> $HWProfiles = Get-SCHardwareProfile | where {$_.Name -match "Profile"}
PS C:\> ForEach ($HWProfile in $HWProfiles) {Set-SCHardwareProfile -HardwareProfile $HWProfile -Owner "Contoso\Cesar"}
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 PowerShell ForEach loop statement, type Get-Help about_ForEach
.
Example 3: Specify a new boot order for multiple hardware profiles
PS C:\> $HWProfiles = @(Get-SCHardwareProfile | where {$_.Name -match "HWProfile"})
PS C:\> ForEach ($HWProfile in $HWProfiles) {Set-SCHardwareProfile -HardwareProfile $HWProfile -BootOrder PXEBoot,CD,IDEHardDrive,Floppy}
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.
Example 4: Search for hardware profiles with a specific configuration and append text to the description field
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 four Processors)"}
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 four Processors)" to the contents of each instance of $Text.
Example 5: Enable Dynamic Memory for an existing hardware profile
PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile05" }
PS C:\> Set-SCHardwareProfile -HardwareProfile $HWProfile -DynamicMemoryEnabled $True -MemoryMB 1024 -DynamicMemoryMaximumMB 2048
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.
Parameters
-AutomaticCriticalErrorAction
Specifies the action to take when the VM encounters a critical error, and exceeds the timeout duration specified by the AutomaticCriticalErrorActionTimeout parameter. The acceptable values for this parameter are: Pause and None.
Type: | UInt16 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AutomaticCriticalErrorActionTimeout
Specifies the amount of time, in minutes, to wait in critical pause before powering off the virtual machine.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BootOrder
Specifies the order, as an array, of devices that a virtual machine on a Hyper-V host uses to start. Valid values are:
- CD
- IDEHardDrive
- PXEBoot
- Floppy
Example format: -BootOrder PXEBoot,IDEHardDrive,CD,Floppy
Type: | BootDevice[] |
Accepted values: | Floppy, CD, IdeHardDrive, PxeBoot, Unknown |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CapabilityProfile
Specifies a capability profile object.
Type: | CapabilityProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CheckpointType
Specifies the Checkpoint type. The acceptable values for this parameter are:
- Disabled
- Production
- ProductionOnly
- Standard
Type: | CheckpointType |
Accepted values: | Disabled, Production, ProductionOnly, Standard |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPUCount
Specifies the number of CPUs on a virtual machine, on a hardware profile, or on a template.
Types of hosts support the following number of CPUs:
- Hyper-V. Up to four CPUs per virtual machine, depending on guest operating system.
- VMware ESX. Up to four CPUs per virtual machine, but only one CPU on a virtual machine that runs Windows NT 4.0.
- Citrix XenServer. Up to eight CPUs per virtual machine, depending on guest operating system.
Type: | Byte |
Aliases: | ProcessorCount |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPUExpectedUtilizationPercent
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.
Type: | Int32 |
Aliases: | ExpectedCPUUtilization |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPULimitForMigration
Indicates whether to limit 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.
Type: | Boolean |
Aliases: | LimitCPUForMigration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPULimitFunctionality
Indicates whether to enable 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.
Type: | Boolean |
Aliases: | LimitCPUFunctionality |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPUMaximumPercent
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)
Type: | Int32 |
Aliases: | CPUMax |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPUPerVirtualNumaNodeMaximum
Specifies the maximum number of CPUs allowed for each virtual NUMA node.
Type: | Byte |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPURelativeWeight
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 weight value is allocated more CPU resources than a virtual machine with a lower weight value. The VMware term for these values is shares.
Types of hosts support the following relative values:
Hyper-V. 1 to 10000.
VMware ESX. High.
- VMware ESX. Above Normal.
VMware ESX. Normal (default). 1000.
VMware ESX. Below Normal.
- VMware ESX. Low.
VMware ESX. Custom 1 to 1000000.
Citrix XenServer. 1 to 65536, normal is 256.
Type: | Int32 |
Aliases: | RelativeWeight |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPUReserve
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.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPUType
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
.
Type: | ProcessorType |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
States a description for the specified object.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskIops
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)
Type: | Int32 |
Aliases: | DiskIO |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DRProtectionRequired
This parameter is reserved for future use.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DynamicMemoryBufferPercentage
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
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DynamicMemoryEnabled
Indicates whether to enable 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
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DynamicMemoryMaximumMB
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
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DynamicMemoryMinimumMB
Specifies the minimum 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: -DynamicMemoryMinimumMB 1024
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FirstBootDevice
Specifies the device on which a boot is first attempted.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HardwareProfile
Specifies a hardware profile object.
Type: | HardwareProfile |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-HAVMPriority
Specifies the virtual machine priority. Virtual machines start in priority order up to the limits of a host cluster node. Valid input for this parameter is a numeric representation of the priority:
- High. 3000
- Medium. 2000
- Low. 1000
If you specify a value of zero (0), the virtual machine does not restart automatically.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HighlyAvailable
Indicates whether to place a virtual machine 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.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobGroup
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.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MemoryMB
Specifies the amount of random access memory (RAM), in megabytes (MB), on the host that this cmdlet allocates to the converted virtual machine. The default value is 512 MB. For a virtual machine on which dynamic memory is enabled on a host that runs Windows Server 2008 R2 SP1 or later versions, specify the startup memory value.
Types of hosts have the following maximum memory assignable to virtual machines:
- 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 virtual machine.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MemoryPerVirtualNumaNodeMaximumMB
Specifies the maximum amount of memory, in MB, that each virtual NUMA node is allowed.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MemoryWeight
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
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MonitorMaximumCount
Specifies the maximum number of monitors that a virtual video adapter supports.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MonitorMaximumResolution
Specifies the value, as a string, that represents the maximum possible monitor resolution of a virtual video adapter. The acceptable values for this parameter are:
- 1024x768
- 1280x1024
- 1600x1200
- 1920x1200
The default value is 1280x1024.
Example format: -MonitorResolutionMaximum "1600x1200"
Type: | String |
Aliases: | MonitorResolutionMaximum |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of a VMM object.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkUtilizationMbps
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
Type: | Int32 |
Aliases: | NetworkUtilization |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NumaIsolationRequired
Indicates whether NUMA isolation is required.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NumLock
Indicates whether to enable the BIOS value for NumLock on a 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.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Owner
Specifies the owner of a VMM object in the form of a valid domain user account.
- Example format:
-Owner "Contoso\PattiFuller"
- Example format:
-Owner "PattiFuller@Contoso"
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProtectionProvider
Specifies a protection provider.
Type: | ProtectionProvider |
Accepted values: | None, HVR8, HVRBlue, HVRAzure, DiskReplication, SANReplication |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RecoveryPointObjective
Specifies the maximum period for which it is tolerable to lose data from an IT service due to a major incident.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveCapabilityProfile
Removes one or more specified capability profile objects.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplicationGroup
Specifies a ReplicationGroup object.
Type: | ReplicationGroup |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SecureBootEnabled
Indicates whether secure boot is enabled.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SecureBootTemplate
Specifies a secure boot template.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserRole
Specifies a user role object.
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualNumaNodesPerSocketMaximum
Specifies the maximum number of NUMA nodes allowed for each socket.
Type: | Byte |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualVideoAdapterEnabled
Indicates whether to enable 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
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
HardwareProfile
This cmdlet returns a HardwareProfile object.