0

Is there a way to Check / UnCheck "Allow Numa Spanning" for Hyper-V Host Via Powershell

PowerShell
  • 1,991
  • 8
  • 35
  • 57

1 Answers1

1

Try this:

$cn = 'HV1'
$NumaSpanningEnabled = $true

$vmhost = Get-WmiObject -Class Msvm_VirtualSystemManagementServiceSettingData -Namespace root\virtualization -ComputerName $cn
$vmhost.NumaSpanningEnabled=$NumaSpanningEnabled

$vmms = Get-WmiObject -Class Msvm_VirtualSystemManagementService -Namespace root\virtualization -ComputerName $cn
$vmms.ModifyServiceSettings($vmhost.psbase.GetText(1))

In Hyper-V 3.0 it's as easy as:

Set-VMHost -NumaSpanningEnabled <bool>
Shay Levy
  • 121,444
  • 32
  • 184
  • 206