It sets the CPU shares to high locks the memory, and sets the latency to high. This assumes the tag category is 'DOME' and whichever tag that has that category will be associated with that VM
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.MemoryReservationLockedToMax = $true
$spec.LatencySensitivity = New-Object VMware.Vim.LatencySensitivity
$spec.LatencySensitivity.Level = [VMware.Vim.LatencySensitivitySensitivityLevel]::high
Get-VM | where { ($_ | Get-TagAssignment -Category 'Dome') } | foreach {
$vm = $_
$vm | Get-VMResourceConfiguration | Set-VMResourceConfiguration -CpuSharesLevel High
(Get-VM $vm).extensiondata.ReconfigVM_Task($spec)
}
What is the 200 reservation? Do you mean the "MHz" reservation?
I wish I could take full credit. I saw past posts from LucD for setting some of these, I just combined them.