Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

Set-VMProcessor

Brian Lich|Last Updated: 3/22/2017
|
1 Contributor

SYNOPSIS

Configures one or more processors of a virtual machine.

SYNTAX

VMName (Default)

Set-VMProcessor [-CimSession <CimSession[]>] [-ComputerName <String[]>] [-Credential <PSCredential[]>]
 [-VMName] <String[]> [-Count <Int64>] [-CompatibilityForMigrationEnabled <Boolean>]
 [-CompatibilityForOlderOperatingSystemsEnabled <Boolean>] [-HwThreadCountPerCore <Int64>] [-Maximum <Int64>]
 [-Reserve <Int64>] [-RelativeWeight <Int32>] [-MaximumCountPerNumaNode <Int32>]
 [-MaximumCountPerNumaSocket <Int32>] [-ResourcePoolName <String>] [-EnableHostResourceProtection <Boolean>]
 [-ExposeVirtualizationExtensions <Boolean>] [-Passthru] [-WhatIf] [-Confirm] [<CommonParameters>]

VMObject

Set-VMProcessor [-VM] <VirtualMachine[]> [-Count <Int64>] [-CompatibilityForMigrationEnabled <Boolean>]
 [-CompatibilityForOlderOperatingSystemsEnabled <Boolean>] [-HwThreadCountPerCore <Int64>] [-Maximum <Int64>]
 [-Reserve <Int64>] [-RelativeWeight <Int32>] [-MaximumCountPerNumaNode <Int32>]
 [-MaximumCountPerNumaSocket <Int32>] [-ResourcePoolName <String>] [-EnableHostResourceProtection <Boolean>]
 [-ExposeVirtualizationExtensions <Boolean>] [-Passthru] [-WhatIf] [-Confirm] [<CommonParameters>]

VMProcessor

Set-VMProcessor [-VMProcessor] <VMProcessor[]> [-Count <Int64>] [-CompatibilityForMigrationEnabled <Boolean>]
 [-CompatibilityForOlderOperatingSystemsEnabled <Boolean>] [-HwThreadCountPerCore <Int64>] [-Maximum <Int64>]
 [-Reserve <Int64>] [-RelativeWeight <Int32>] [-MaximumCountPerNumaNode <Int32>]
 [-MaximumCountPerNumaSocket <Int32>] [-ResourcePoolName <String>] [-EnableHostResourceProtection <Boolean>]
 [-ExposeVirtualizationExtensions <Boolean>] [-Passthru] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Set-VMProcessor cmdlet configures one or more processors of a virtual machine.

EXAMPLES

Example 1

PS C:\> Set-VMProcessor TestVM -Count 2 -Reserve 10 -Maximum 75 -RelativeWeight 200

Configures virtual machine TestVM with two virtual processors, a reserve of 10%, a limit of 75%, and a relative weight of 200.

Example 2

PS C:\> Set-VMProcessor TestVM -CompatibilityForMigrationEnabled $true

Configures virtual machine TestVM, enabling processor compatibility for live migration.

Example 3

PS C:\> Set-VMProcessor TestVM -CompatibilityForOlderOperatingSystemsEnabled $true

Configures virtual machine TestVM, enabling compatibility for running older operating systems.

PARAMETERS

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Type: CimSession[]
Parameter Sets: VMName
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CompatibilityForMigrationEnabled

Specifies whether the virtual processor's features are to be limited for compatibility when migrating the virtual machine to another host.

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CompatibilityForOlderOperatingSystemsEnabled

Specifies whether the virtual processor's features are to be limited for compatibility with older operating systems.

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ComputerName

Specifies one or more Hyper-V hosts on which processors are to be configured. NetBIOS names, IP addresses, and fully qualified domain names are allowable. The default is the local computer. Use localhost or a dot (.) to specify the local computer explicitly.

Type: String[]
Parameter Sets: VMName
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Count

Specifies the number of processors for the virtual machine.

Type: Int64
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential

Specifies one or more user accounts that have permission to perform this action. The default is the current user.

Type: PSCredential[]
Parameter Sets: VMName
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableHostResourceProtection

Specifies whether to enable host resource protection.

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExposeVirtualizationExtensions

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HwThreadCountPerCore

Type: Int64
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Maximum

Specifies the maximum percentage of resources available to the virtual machine processor to be configured. Allowed values range from 0 to 100.

Type: Int64
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumCountPerNumaNode

Specifies the maximum number of processors per NUMA node to be configured for the virtual machine.

Type: Int32
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumCountPerNumaSocket

Specifies the maximum number of sockets per NUMA node to be configured for the virtual machine.

Type: Int32
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Passthru

Specifies that a Microsoft.HyperV.PowerShell.Processor is to be passed through to the pipeline representing the processor to be configured.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RelativeWeight

Specifies the priority for allocating the physical computer's processing power to this virtual machine relative to others. Allowed values range from 1 to 10000.

Type: Int32
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Reserve

Specifies the percentage of processor resources to be reserved for this virtual machine. Allowed values range from 0 to 100.

Type: Int64
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourcePoolName

Specifies the name of the processor resource pool to be used.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VM

Specifies the virtual machine on which the processor is to be configured.

Type: VirtualMachine[]
Parameter Sets: VMObject
Aliases: 

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-VMName

Specifies the name of the virtual machine on which the processor is to be configured.

Type: String[]
Parameter Sets: VMName
Aliases: 

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-VMProcessor

Specifies the virtual machine processor to be configured.

Type: VMProcessor[]
Parameter Sets: VMProcessor
Aliases: 

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

OUTPUTS

None by default; Microsoft.HyperV.PowerShell.VMProcessor if PassThru is specified.

NOTES

© 2017 Microsoft