Quantcast
Channel: VMware Communities : Discussion List - ESXi
Viewing all articles
Browse latest Browse all 8132

Run Script for monitor_control.enable_softResetClearTSC only for a Specific Set of VMs - Windows 2012

$
0
0

This is the script found here: VMware Knowledge Base

 

I want to execute this without running on ALL VMs. How would i add a " Get-Content $ChangeMonitorcontrol | ForEach-Object " to the script below pointing it to a txt file of VM names?

 

 

ForEach ($vm in (Get-VM)){

$vmv = Get-VM $vm | Get-View

$name = $vmv.Name

$guestid = $vmv.Summary.Config.GuestId

$vmx = New-Object VMware.Vim.VirtualMachineConfigSpec

$vmx.extraConfig += New-Object VMware.Vim.OptionValue

$vmx.extraConfig[0].key = "monitor_control.enable_softResetClearTSC"

$vmx.extraConfig[0].value = "TRUE"

if ($guestid -like "windows8*Guest") {

($vmv).ReconfigVM_Task($vmx)
}

}


Viewing all articles
Browse latest Browse all 8132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>